
/* WARNING: Unknown calling convention */

char * filename_unescape(char *s,size_t s_len)

{
  bool bVar1;
  char cVar2;
  char *pcVar3;
  char *pcVar4;
  uint uVar5;
  char *dst;
  
  uVar5 = 0;
  if (s_len == 0) {
    return s;
  }
  pcVar3 = s + 1;
  do {
    pcVar4 = pcVar3;
    cVar2 = s[uVar5];
    if (cVar2 == '\0') {
      return (char *)0x0;
    }
    if (cVar2 == '\\') {
      bVar1 = s_len - 1 == uVar5;
      uVar5 = uVar5 + 1;
      if (bVar1) {
        return (char *)0x0;
      }
      if (s[uVar5] == '\\') {
        pcVar4[-1] = '\\';
      }
      else {
        if (s[uVar5] != 'n') {
          return (char *)0x0;
        }
        pcVar4[-1] = '\n';
      }
    }
    else {
      pcVar4[-1] = cVar2;
    }
    uVar5 = uVar5 + 1;
    pcVar3 = pcVar4 + 1;
  } while (uVar5 < s_len);
  if (pcVar4 < s + s_len) {
    *pcVar4 = '\0';
    return s;
  }
  return s;
}



int FUN_00011be0(int param_1,uint param_2)

{
  bool bVar1;
  char cVar2;
  undefined1 *puVar3;
  undefined1 *puVar4;
  uint uVar5;
  
  uVar5 = 0;
  if (param_2 == 0) {
    return param_1;
  }
  puVar3 = (undefined1 *)(param_1 + 1);
  do {
    puVar4 = puVar3;
    cVar2 = *(char *)(param_1 + uVar5);
    if (cVar2 == '\0') {
      return 0;
    }
    if (cVar2 == '\\') {
      bVar1 = param_2 - 1 == uVar5;
      uVar5 = uVar5 + 1;
      if (bVar1) {
        return 0;
      }
      if (*(char *)(param_1 + uVar5) == '\\') {
        puVar4[-1] = 0x5c;
      }
      else {
        if (*(char *)(param_1 + uVar5) != 'n') {
          return 0;
        }
        puVar4[-1] = 10;
      }
    }
    else {
      puVar4[-1] = cVar2;
    }
    uVar5 = uVar5 + 1;
    puVar3 = puVar4 + 1;
  } while (uVar5 < param_2);
  if (puVar4 < (undefined1 *)(param_1 + param_2)) {
    *puVar4 = 0;
    return param_1;
  }
  return param_1;
}


beq a1,zero,0x00011c84
_or v1,zero,zero
addiu v0,a0,0x1
li a3,0x5c
addiu t0,a1,-0x1
li t4,0x5c
li t1,0x6e
b 0x00011c28
_li t3,0xa
or t2,v0,zero
b 0x00011c18
_sb t4,-0x1(v0)
or t2,v0,zero
sb a2,-0x1(v0)
addiu v1,v1,0x1
sltu a2,v1,a1
beq a2,zero,0x00011c68
_addiu v0,v0,0x1
addu a2,a0,v1
lb a2,0x0(a2)
beq a2,zero,0x00011c8c
_nop
bne a2,a3,0x00011c10
_nop
beq t0,v1,0x00011c94
_addiu v1,v1,0x1
addu a2,a0,v1
lb a2,0x0(a2)
beq a2,a3,0x00011c04
_nop
bne a2,t1,0x00011c9c
_or t2,v0,zero
b 0x00011c18
_sb t3,-0x1(v0)
addu v0,a0,a1
sltu v0,t2,v0
beq v0,zero,0x00011ca4
_nop
sb zero,0x0(t2)
jr ra
_or v0,a0,zero
jr ra
_or v0,a0,zero
jr ra
_or v0,zero,zero
jr ra
_or v0,zero,zero
jr ra
_or v0,zero,zero
jr ra
_or v0,a0,zero
(translation_unit "int FUN_00011be0(int param_1,uint param_2)\n\n{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}\n\n" (function_definition "int FUN_00011be0(int param_1,uint param_2)\n\n{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}" primitive_type (function_declarator "FUN_00011be0(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (param_2 == 0) {\n    return param_1;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "puVar3 = (undefined1 *)(param_1 + 1);" (assignment_expression "puVar3 = (undefined1 *)(param_1 + 1)" identifier = (cast_expression "(undefined1 *)(param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) ;) (do_statement "do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);" do (compound_statement "{\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  }" { (expression_statement "puVar4 = puVar3;" (assignment_expression "puVar4 = puVar3" identifier = identifier) ;) (expression_statement "cVar2 = *(char *)(param_1 + uVar5);" (assignment_expression "cVar2 = *(char *)(param_1 + uVar5)" identifier = (pointer_expression "*(char *)(param_1 + uVar5)" * (cast_expression "(char *)(param_1 + uVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar5)" ( (binary_expression "param_1 + uVar5" identifier + identifier) ))))) ;) (if_statement "if (cVar2 == '\0') {\n      return 0;\n    }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }" if (parenthesized_expression "(cVar2 == '\\')" ( (binary_expression "cVar2 == '\\'" identifier == (char_literal "'\\'" ' escape_sequence ')) )) (compound_statement "{\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }" { (expression_statement "bVar1 = param_2 - 1 == uVar5;" (assignment_expression "bVar1 = param_2 - 1 == uVar5" identifier = (binary_expression "param_2 - 1 == uVar5" (binary_expression "param_2 - 1" identifier - number_literal) == identifier)) ;) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (if_statement "if (bVar1) {\n        return 0;\n      }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" if (parenthesized_expression "(*(char *)(param_1 + uVar5) == '\\')" ( (binary_expression "*(char *)(param_1 + uVar5) == '\\'" (pointer_expression "*(char *)(param_1 + uVar5)" * (cast_expression "(char *)(param_1 + uVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar5)" ( (binary_expression "param_1 + uVar5" identifier + identifier) )))) == (char_literal "'\\'" ' escape_sequence ')) )) (compound_statement "{\n        puVar4[-1] = 0x5c;\n      }" { (expression_statement "puVar4[-1] = 0x5c;" (assignment_expression "puVar4[-1] = 0x5c" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" else (compound_statement "{\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" { (if_statement "if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }" if (parenthesized_expression "(*(char *)(param_1 + uVar5) != 'n')" ( (binary_expression "*(char *)(param_1 + uVar5) != 'n'" (pointer_expression "*(char *)(param_1 + uVar5)" * (cast_expression "(char *)(param_1 + uVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar5)" ( (binary_expression "param_1 + uVar5" identifier + identifier) )))) != (char_literal "'n'" ' character ')) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar4[-1] = 10;" (assignment_expression "puVar4[-1] = 10" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = number_literal) ;) }))) }) (else_clause "else {\n      puVar4[-1] = cVar2;\n    }" else (compound_statement "{\n      puVar4[-1] = cVar2;\n    }" { (expression_statement "puVar4[-1] = cVar2;" (assignment_expression "puVar4[-1] = cVar2" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar4 + 1;" (assignment_expression "puVar3 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 < param_2)" ( (binary_expression "uVar5 < param_2" identifier < identifier) )) ;) (if_statement "if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }" if (parenthesized_expression "(puVar4 < (undefined1 *)(param_1 + param_2))" ( (binary_expression "puVar4 < (undefined1 *)(param_1 + param_2)" identifier < (cast_expression "(undefined1 *)(param_1 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + param_2)" ( (binary_expression "param_1 + param_2" identifier + identifier) )))) )) (compound_statement "{\n    *puVar4 = 0;\n    return param_1;\n  }" { (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nchar * filename_unescape(char *s,size_t s_len)\n\n{\n  bool bVar1;\n  char cVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *dst;\n  \n  uVar5 = 0;\n  if (s_len == 0) {\n    return s;\n  }\n  pcVar3 = s + 1;\n  do {\n    pcVar4 = pcVar3;\n    cVar2 = s[uVar5];\n    if (cVar2 == '\0') {\n      return (char *)0x0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = s_len - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return (char *)0x0;\n      }\n      if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }\n    }\n    else {\n      pcVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    pcVar3 = pcVar4 + 1;\n  } while (uVar5 < s_len);\n  if (pcVar4 < s + s_len) {\n    *pcVar4 = '\0';\n    return s;\n  }\n  return s;\n}\n\n" comment (function_definition "char * filename_unescape(char *s,size_t s_len)\n\n{\n  bool bVar1;\n  char cVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *dst;\n  \n  uVar5 = 0;\n  if (s_len == 0) {\n    return s;\n  }\n  pcVar3 = s + 1;\n  do {\n    pcVar4 = pcVar3;\n    cVar2 = s[uVar5];\n    if (cVar2 == '\0') {\n      return (char *)0x0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = s_len - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return (char *)0x0;\n      }\n      if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }\n    }\n    else {\n      pcVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    pcVar3 = pcVar4 + 1;\n  } while (uVar5 < s_len);\n  if (pcVar4 < s + s_len) {\n    *pcVar4 = '\0';\n    return s;\n  }\n  return s;\n}" primitive_type (pointer_declarator "* filename_unescape(char *s,size_t s_len)" * (function_declarator "filename_unescape(char *s,size_t s_len)" identifier (parameter_list "(char *s,size_t s_len)" ( (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "size_t s_len" primitive_type identifier) )))) (compound_statement "{\n  bool bVar1;\n  char cVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *dst;\n  \n  uVar5 = 0;\n  if (s_len == 0) {\n    return s;\n  }\n  pcVar3 = s + 1;\n  do {\n    pcVar4 = pcVar3;\n    cVar2 = s[uVar5];\n    if (cVar2 == '\0') {\n      return (char *)0x0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = s_len - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return (char *)0x0;\n      }\n      if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }\n    }\n    else {\n      pcVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    pcVar3 = pcVar4 + 1;\n  } while (uVar5 < s_len);\n  if (pcVar4 < s + s_len) {\n    *pcVar4 = '\0';\n    return s;\n  }\n  return s;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "char *dst;" primitive_type (pointer_declarator "*dst" * identifier) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (s_len == 0) {\n    return s;\n  }" if (parenthesized_expression "(s_len == 0)" ( (binary_expression "s_len == 0" identifier == number_literal) )) (compound_statement "{\n    return s;\n  }" { (return_statement "return s;" return identifier ;) })) (expression_statement "pcVar3 = s + 1;" (assignment_expression "pcVar3 = s + 1" identifier = (binary_expression "s + 1" identifier + number_literal)) ;) (do_statement "do {\n    pcVar4 = pcVar3;\n    cVar2 = s[uVar5];\n    if (cVar2 == '\0') {\n      return (char *)0x0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = s_len - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return (char *)0x0;\n      }\n      if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }\n    }\n    else {\n      pcVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    pcVar3 = pcVar4 + 1;\n  } while (uVar5 < s_len);" do (compound_statement "{\n    pcVar4 = pcVar3;\n    cVar2 = s[uVar5];\n    if (cVar2 == '\0') {\n      return (char *)0x0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = s_len - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return (char *)0x0;\n      }\n      if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }\n    }\n    else {\n      pcVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    pcVar3 = pcVar4 + 1;\n  }" { (expression_statement "pcVar4 = pcVar3;" (assignment_expression "pcVar4 = pcVar3" identifier = identifier) ;) (expression_statement "cVar2 = s[uVar5];" (assignment_expression "cVar2 = s[uVar5]" identifier = (subscript_expression "s[uVar5]" identifier [ identifier ])) ;) (if_statement "if (cVar2 == '\0') {\n      return (char *)0x0;\n    }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return (char *)0x0;\n    }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (cVar2 == '\\') {\n      bVar1 = s_len - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return (char *)0x0;\n      }\n      if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }\n    }\n    else {\n      pcVar4[-1] = cVar2;\n    }" if (parenthesized_expression "(cVar2 == '\\')" ( (binary_expression "cVar2 == '\\'" identifier == (char_literal "'\\'" ' escape_sequence ')) )) (compound_statement "{\n      bVar1 = s_len - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return (char *)0x0;\n      }\n      if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }\n    }" { (expression_statement "bVar1 = s_len - 1 == uVar5;" (assignment_expression "bVar1 = s_len - 1 == uVar5" identifier = (binary_expression "s_len - 1 == uVar5" (binary_expression "s_len - 1" identifier - number_literal) == identifier)) ;) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (if_statement "if (bVar1) {\n        return (char *)0x0;\n      }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n        return (char *)0x0;\n      }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (s[uVar5] == '\\') {\n        pcVar4[-1] = '\\';\n      }\n      else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }" if (parenthesized_expression "(s[uVar5] == '\\')" ( (binary_expression "s[uVar5] == '\\'" (subscript_expression "s[uVar5]" identifier [ identifier ]) == (char_literal "'\\'" ' escape_sequence ')) )) (compound_statement "{\n        pcVar4[-1] = '\\';\n      }" { (expression_statement "pcVar4[-1] = '\\';" (assignment_expression "pcVar4[-1] = '\\'" (subscript_expression "pcVar4[-1]" identifier [ number_literal ]) = (char_literal "'\\'" ' escape_sequence ')) ;) }) (else_clause "else {\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }" else (compound_statement "{\n        if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }\n        pcVar4[-1] = '\n';\n      }" { (if_statement "if (s[uVar5] != 'n') {\n          return (char *)0x0;\n        }" if (parenthesized_expression "(s[uVar5] != 'n')" ( (binary_expression "s[uVar5] != 'n'" (subscript_expression "s[uVar5]" identifier [ identifier ]) != (char_literal "'n'" ' character ')) )) (compound_statement "{\n          return (char *)0x0;\n        }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar4[-1] = '\n';" (assignment_expression "pcVar4[-1] = '\n'" (subscript_expression "pcVar4[-1]" identifier [ number_literal ]) = (char_literal "'\n'" ' escape_sequence ')) ;) }))) }) (else_clause "else {\n      pcVar4[-1] = cVar2;\n    }" else (compound_statement "{\n      pcVar4[-1] = cVar2;\n    }" { (expression_statement "pcVar4[-1] = cVar2;" (assignment_expression "pcVar4[-1] = cVar2" (subscript_expression "pcVar4[-1]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "pcVar3 = pcVar4 + 1;" (assignment_expression "pcVar3 = pcVar4 + 1" identifier = (binary_expression "pcVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 < s_len)" ( (binary_expression "uVar5 < s_len" identifier < identifier) )) ;) (if_statement "if (pcVar4 < s + s_len) {\n    *pcVar4 = '\0';\n    return s;\n  }" if (parenthesized_expression "(pcVar4 < s + s_len)" ( (binary_expression "pcVar4 < s + s_len" identifier < (binary_expression "s + s_len" identifier + identifier)) )) (compound_statement "{\n    *pcVar4 = '\0';\n    return s;\n  }" { (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return s;" return identifier ;) })) (return_statement "return s;" return identifier ;) })))
(translation_unit "int FUN_00011be0(int param_1,uint param_2)\n\n{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}\n\n" (function_definition "int FUN_00011be0(int param_1,uint param_2)\n\n{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}" primitive_type (function_declarator "FUN_00011be0(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (param_2 == 0) {\n    return param_1;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "puVar3 = (undefined1 *)(param_1 + 1);" (assignment_expression "puVar3 = (undefined1 *)(param_1 + 1)" identifier = (cast_expression "(undefined1 *)(param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) ;) (do_statement "do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);" do (compound_statement "{\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  }" { (expression_statement "puVar4 = puVar3;" (assignment_expression "puVar4 = puVar3" identifier = identifier) ;) (expression_statement "cVar2 = *(char *)(param_1 + uVar5);" (assignment_expression "cVar2 = *(char *)(param_1 + uVar5)" identifier = (pointer_expression "*(char *)(param_1 + uVar5)" * (cast_expression "(char *)(param_1 + uVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar5)" ( (binary_expression "param_1 + uVar5" identifier + identifier) ))))) ;) (if_statement "if (cVar2 == '\0') {\n      return 0;\n    }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }" if (parenthesized_expression "(cVar2 == '\\')" ( (binary_expression "cVar2 == '\\'" identifier == (char_literal "'\\'" ' escape_sequence ')) )) (compound_statement "{\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }" { (expression_statement "bVar1 = param_2 - 1 == uVar5;" (assignment_expression "bVar1 = param_2 - 1 == uVar5" identifier = (binary_expression "param_2 - 1 == uVar5" (binary_expression "param_2 - 1" identifier - number_literal) == identifier)) ;) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (if_statement "if (bVar1) {\n        return 0;\n      }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" if (parenthesized_expression "(*(char *)(param_1 + uVar5) == '\\')" ( (binary_expression "*(char *)(param_1 + uVar5) == '\\'" (pointer_expression "*(char *)(param_1 + uVar5)" * (cast_expression "(char *)(param_1 + uVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar5)" ( (binary_expression "param_1 + uVar5" identifier + identifier) )))) == (char_literal "'\\'" ' escape_sequence ')) )) (compound_statement "{\n        puVar4[-1] = 0x5c;\n      }" { (expression_statement "puVar4[-1] = 0x5c;" (assignment_expression "puVar4[-1] = 0x5c" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" else (compound_statement "{\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" { (if_statement "if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }" if (parenthesized_expression "(*(char *)(param_1 + uVar5) != 'n')" ( (binary_expression "*(char *)(param_1 + uVar5) != 'n'" (pointer_expression "*(char *)(param_1 + uVar5)" * (cast_expression "(char *)(param_1 + uVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar5)" ( (binary_expression "param_1 + uVar5" identifier + identifier) )))) != (char_literal "'n'" ' character ')) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar4[-1] = 10;" (assignment_expression "puVar4[-1] = 10" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = number_literal) ;) }))) }) (else_clause "else {\n      puVar4[-1] = cVar2;\n    }" else (compound_statement "{\n      puVar4[-1] = cVar2;\n    }" { (expression_statement "puVar4[-1] = cVar2;" (assignment_expression "puVar4[-1] = cVar2" (subscript_expression "puVar4[-1]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar4 + 1;" (assignment_expression "puVar3 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 < param_2)" ( (binary_expression "uVar5 < param_2" identifier < identifier) )) ;) (if_statement "if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }" if (parenthesized_expression "(puVar4 < (undefined1 *)(param_1 + param_2))" ( (binary_expression "puVar4 < (undefined1 *)(param_1 + param_2)" identifier < (cast_expression "(undefined1 *)(param_1 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + param_2)" ( (binary_expression "param_1 + param_2" identifier + identifier) )))) )) (compound_statement "{\n    *puVar4 = 0;\n    return param_1;\n  }" { (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - LIT) == IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) != (char_literal ' character ')) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00011be0(int param_1,uint param_2)\n\n{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}" (primitive_type "int") (function_declarator "FUN_00011be0(int param_1,uint param_2)" (identifier "FUN_00011be0") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  bool bVar1;\n  char cVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  uint uVar5;\n  \n  uVar5 = 0;\n  if (param_2 == 0) {\n    return param_1;\n  }\n  puVar3 = (undefined1 *)(param_1 + 1);\n  do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);\n  if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }\n  return param_1;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "undefined1 *puVar3;" (type_identifier "undefined1") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_2 == 0) {\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return param_1;\n  }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "puVar3 = (undefined1 *)(param_1 + 1);" (assignment_expression "puVar3 = (undefined1 *)(param_1 + 1)" (identifier "puVar3") (= "=") (cast_expression "(undefined1 *)(param_1 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 1)" (( "(") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) () ")")))) (; ";")) (do_statement "do {\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  } while (uVar5 < param_2);" (do "do") (compound_statement "{\n    puVar4 = puVar3;\n    cVar2 = *(char *)(param_1 + uVar5);\n    if (cVar2 == '\0') {\n      return 0;\n    }\n    if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }\n    uVar5 = uVar5 + 1;\n    puVar3 = puVar4 + 1;\n  }" ({ "{") (expression_statement "puVar4 = puVar3;" (assignment_expression "puVar4 = puVar3" (identifier "puVar4") (= "=") (identifier "puVar3")) (; ";")) (expression_statement "cVar2 = *(char *)(param_1 + uVar5);" (assignment_expression "cVar2 = *(char *)(param_1 + uVar5)" (identifier "cVar2") (= "=") (pointer_expression "*(char *)(param_1 + uVar5)" (* "*") (cast_expression "(char *)(param_1 + uVar5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar5)" (( "(") (binary_expression "param_1 + uVar5" (identifier "param_1") (+ "+") (identifier "uVar5")) () ")"))))) (; ";")) (if_statement "if (cVar2 == '\0') {\n      return 0;\n    }" (if "if") (parenthesized_expression "(cVar2 == '\0')" (( "(") (binary_expression "cVar2 == '\0'" (identifier "cVar2") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (cVar2 == '\\') {\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }\n    else {\n      puVar4[-1] = cVar2;\n    }" (if "if") (parenthesized_expression "(cVar2 == '\\')" (( "(") (binary_expression "cVar2 == '\\'" (identifier "cVar2") (== "==") (char_literal "'\\'" (' "'") (escape_sequence "\\") (' "'"))) () ")")) (compound_statement "{\n      bVar1 = param_2 - 1 == uVar5;\n      uVar5 = uVar5 + 1;\n      if (bVar1) {\n        return 0;\n      }\n      if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }\n    }" ({ "{") (expression_statement "bVar1 = param_2 - 1 == uVar5;" (assignment_expression "bVar1 = param_2 - 1 == uVar5" (identifier "bVar1") (= "=") (binary_expression "param_2 - 1 == uVar5" (binary_expression "param_2 - 1" (identifier "param_2") (- "-") (number_literal "1")) (== "==") (identifier "uVar5"))) (; ";")) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (bVar1) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (*(char *)(param_1 + uVar5) == '\\') {\n        puVar4[-1] = 0x5c;\n      }\n      else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" (if "if") (parenthesized_expression "(*(char *)(param_1 + uVar5) == '\\')" (( "(") (binary_expression "*(char *)(param_1 + uVar5) == '\\'" (pointer_expression "*(char *)(param_1 + uVar5)" (* "*") (cast_expression "(char *)(param_1 + uVar5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar5)" (( "(") (binary_expression "param_1 + uVar5" (identifier "param_1") (+ "+") (identifier "uVar5")) () ")")))) (== "==") (char_literal "'\\'" (' "'") (escape_sequence "\\") (' "'"))) () ")")) (compound_statement "{\n        puVar4[-1] = 0x5c;\n      }" ({ "{") (expression_statement "puVar4[-1] = 0x5c;" (assignment_expression "puVar4[-1] = 0x5c" (subscript_expression "puVar4[-1]" (identifier "puVar4") ([ "[") (number_literal "-1") (] "]")) (= "=") (number_literal "0x5c")) (; ";")) (} "}")) (else_clause "else {\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" (else "else") (compound_statement "{\n        if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }\n        puVar4[-1] = 10;\n      }" ({ "{") (if_statement "if (*(char *)(param_1 + uVar5) != 'n') {\n          return 0;\n        }" (if "if") (parenthesized_expression "(*(char *)(param_1 + uVar5) != 'n')" (( "(") (binary_expression "*(char *)(param_1 + uVar5) != 'n'" (pointer_expression "*(char *)(param_1 + uVar5)" (* "*") (cast_expression "(char *)(param_1 + uVar5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar5)" (( "(") (binary_expression "param_1 + uVar5" (identifier "param_1") (+ "+") (identifier "uVar5")) () ")")))) (!= "!=") (char_literal "'n'" (' "'") (character "n") (' "'"))) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "puVar4[-1] = 10;" (assignment_expression "puVar4[-1] = 10" (subscript_expression "puVar4[-1]" (identifier "puVar4") ([ "[") (number_literal "-1") (] "]")) (= "=") (number_literal "10")) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n      puVar4[-1] = cVar2;\n    }" (else "else") (compound_statement "{\n      puVar4[-1] = cVar2;\n    }" ({ "{") (expression_statement "puVar4[-1] = cVar2;" (assignment_expression "puVar4[-1] = cVar2" (subscript_expression "puVar4[-1]" (identifier "puVar4") ([ "[") (number_literal "-1") (] "]")) (= "=") (identifier "cVar2")) (; ";")) (} "}")))) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar3 = puVar4 + 1;" (assignment_expression "puVar3 = puVar4 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 < param_2)" (( "(") (binary_expression "uVar5 < param_2" (identifier "uVar5") (< "<") (identifier "param_2")) () ")")) (; ";")) (if_statement "if (puVar4 < (undefined1 *)(param_1 + param_2)) {\n    *puVar4 = 0;\n    return param_1;\n  }" (if "if") (parenthesized_expression "(puVar4 < (undefined1 *)(param_1 + param_2))" (( "(") (binary_expression "puVar4 < (undefined1 *)(param_1 + param_2)" (identifier "puVar4") (< "<") (cast_expression "(undefined1 *)(param_1 + param_2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + param_2)" (( "(") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2")) () ")")))) () ")")) (compound_statement "{\n    *puVar4 = 0;\n    return param_1;\n  }" ({ "{") (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

char * function_1(char *var_2,size_t var_1)

{
  bool bVar1;
  char var_3;
  char *pcVar3;
  char *var_5;
  type_1 var_4;
  char *dst;
  
  var_4 = 0;
  if (var_1 == 0) {
    return var_2;
  }
  pcVar3 = var_2 + 1;
  do {
    var_5 = pcVar3;
    var_3 = var_2[var_4];
    if (var_3 == '\0') {
      return (char *)0x0;
    }
    if (var_3 == '\\') {
      bVar1 = var_1 - 1 == var_4;
      var_4 = var_4 + 1;
      if (bVar1) {
        return (char *)0x0;
      }
      if (var_2[var_4] == '\\') {
        var_5[-1] = '\\';
      }
      else {
        if (var_2[var_4] != 'n') {
          return (char *)0x0;
        }
        var_5[-1] = '\n';
      }
    }
    else {
      var_5[-1] = var_3;
    }
    var_4 = var_4 + 1;
    pcVar3 = var_5 + 1;
  } while (var_4 < var_1);
  if (var_5 < var_2 + var_1) {
    *var_5 = '\0';
    return var_2;
  }
  return var_2;
}


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

int MASKED(int param_1,uint param_2)

{
  bool bVar1;
  char cVar2;
  undefined1 *puVar3;
  undefined1 *puVar4;
  uint uVar5;
  
  uVar5 = 0;
  if (param_2 == 0) {
    return param_1;
  }
  puVar3 = (undefined1 *)(param_1 + 1);
  do {
    puVar4 = puVar3;
    cVar2 = *(char *)(param_1 + uVar5);
    if (cVar2 == '\0') {
      return 0;
    }
    if (cVar2 == '\\') {
      bVar1 = param_2 - 1 == uVar5;
      uVar5 = uVar5 + 1;
      if (bVar1) {
        return 0;
      }
      if (*(char *)(param_1 + uVar5) == '\\') {
        puVar4[-1] = 0x5c;
      }
      else {
        if (*(char *)(param_1 + uVar5) != 'n') {
          return 0;
        }
        puVar4[-1] = 10;
      }
    }
    else {
      puVar4[-1] = cVar2;
    }
    uVar5 = uVar5 + 1;
    puVar3 = puVar4 + 1;
  } while (uVar5 < param_2);
  if (puVar4 < (undefined1 *)(param_1 + param_2)) {
    *puVar4 = 0;
    return param_1;
  }
  return param_1;
}

