
int displen(char *s)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,s,0);
  if (iVar1 == -1) {
    iVar3 = 4;
    iVar4 = 1;
    iVar1 = 0;
  }
  else {
    iVar4 = iVar1 + 1;
    iVar3 = iVar4 * 4;
  }
  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);
  (*(code *)PTR_mbstowcs_001462a8)(uVar2,s,iVar4);
  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);
  (*(code *)PTR_free_001464fc)(uVar2);
  if (iVar1 < 0) {
    if ((s == (char *)0x0) || (*s == '\0')) {
      return 0;
    }
    iVar1 = 1;
    if (s[1] != '\0') {
      if (s[2] != '\0') {
        iVar1 = (*(code *)PTR_strlen_00146390)(s);
        return iVar1;
      }
      iVar1 = 2;
    }
  }
  return iVar1;
}



int FUN_00048d98(char *param_1)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);
  if (iVar1 == -1) {
    iVar3 = 4;
    iVar4 = 1;
    iVar1 = 0;
  }
  else {
    iVar4 = iVar1 + 1;
    iVar3 = iVar4 * 4;
  }
  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);
  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);
  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);
  (*(code *)PTR_free_001464fc)(uVar2);
  if (iVar1 < 0) {
    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
      return 0;
    }
    iVar1 = 1;
    if (param_1[1] != '\0') {
      if (param_1[2] != '\0') {
                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */
                    /* WARNING: Treating indirect jump as call */
        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);
        return iVar1;
      }
      iVar1 = 2;
    }
  }
  return iVar1;
}


lui gp,0x10
addiu gp,gp,0x37a8
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x6298(gp)
or a2,zero,zero
sw s2,0x24(sp)
or s2,a0,zero
or a0,zero,zero
sw gp,0x10(sp)
sw ra,0x2c(sp)
or a1,s2,zero
sw s3,0x28(sp)
sw s1,0x20(sp)
jalr t9
_sw s0,0x1c(sp)
li v1,-0x1
beq v0,v1,0x00048ed0
_lw gp,0x10(sp)
addiu s3,v0,0x1
or s1,v0,zero
sll a0,s3,0x2
lw t9,-0x7f90(gp)
jalr t9
_nop
or a2,s3,zero
lw gp,0x10(sp)
or a1,s2,zero
or a0,v0,zero
lw t9,-0x6298(gp)
jalr t9
_or s0,v0,zero
or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x6260(gp)
jalr t9
_or a1,s1,zero
or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x6044(gp)
jalr t9
_or s0,v0,zero
bltz s0,0x00048e68
_lw gp,0x10(sp)
lw ra,0x2c(sp)
or v0,s0,zero
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
beq s2,zero,0x00048eb0
_lw ra,0x2c(sp)
lb v0,0x0(s2)
beq v0,zero,0x00048eb4
_or s0,zero,zero
lb v0,0x1(s2)
beq v0,zero,0x00048e4c
_li s0,0x1
lb v0,0x2(s2)
beq v0,zero,0x00048ee0
_lw s3,0x28(sp)
or a0,s2,zero
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
lw t9,-0x61b0(gp)
jr t9
_addiu sp,sp,0x30
or s0,zero,zero
lw s3,0x28(sp)
or v0,s0,zero
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
li a0,0x4
li s3,0x1
b 0x00048df0
_or s1,zero,zero
b 0x00048e48
_li s0,0x2
(translation_unit "int FUN_00048d98(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_00048d98(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00048d98(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);" (assignment_expression "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0)" identifier = (call_expression "(*(code *)PTR_mbstowcs_001462a8)(0,param_1,0)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" ( (pointer_expression "*(code *)PTR_mbstowcs_001462a8" * (cast_expression "(code *)PTR_mbstowcs_001462a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,param_1,0)" ( number_literal , identifier , number_literal )))) ;) (if_statement "if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }" { (expression_statement "iVar3 = 4;" (assignment_expression "iVar3 = 4" identifier = number_literal) ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" else (compound_statement "{\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" { (expression_statement "iVar4 = iVar1 + 1;" (assignment_expression "iVar4 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "iVar3 = iVar4 * 4;" (assignment_expression "iVar3 = iVar4 * 4" identifier = (binary_expression "iVar4 * 4" identifier * number_literal)) ;) }))) (expression_statement "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);" (assignment_expression "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar3)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "(*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);" (call_expression "(*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" ( (pointer_expression "*(code *)PTR_mbstowcs_001462a8" * (cast_expression "(code *)PTR_mbstowcs_001462a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_1,iVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);" (assignment_expression "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" identifier = (call_expression "(*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" (parenthesized_expression "(*(code *)PTR_wcswidth_001462e0)" ( (pointer_expression "*(code *)PTR_wcswidth_001462e0" * (cast_expression "(code *)PTR_wcswidth_001462e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,iVar1)" ( identifier , identifier )))) ;) (expression_statement "(*(code *)PTR_free_001464fc)(uVar2);" (call_expression "(*(code *)PTR_free_001464fc)(uVar2)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" { (if_statement "if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }" if (parenthesized_expression "((param_1 == (char *)0x0) || (*param_1 == '\0'))" ( (binary_expression "(param_1 == (char *)0x0) || (*param_1 == '\0')" (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" if (parenthesized_expression "(param_1[1] != '\0')" ( (binary_expression "param_1[1] != '\0'" (subscript_expression "param_1[1]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" { (if_statement "if (param_1[2] != '\0') {\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }" if (parenthesized_expression "(param_1[2] != '\0')" ( (binary_expression "param_1[2] != '\0'" (subscript_expression "param_1[2]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }" { comment comment (expression_statement "iVar1 = (*(code *)PTR_strlen_00146390)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_00146390)(param_1)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" identifier = number_literal) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int displen(char *s)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,s,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,s,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((s == (char *)0x0) || (*s == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (s[1] != '\0') {\n      if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int displen(char *s)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,s,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,s,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((s == (char *)0x0) || (*s == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (s[1] != '\0') {\n      if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "displen(char *s)" identifier (parameter_list "(char *s)" ( (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,s,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,s,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((s == (char *)0x0) || (*s == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (s[1] != '\0') {\n      if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,s,0);" (assignment_expression "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,s,0)" identifier = (call_expression "(*(code *)PTR_mbstowcs_001462a8)(0,s,0)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" ( (pointer_expression "*(code *)PTR_mbstowcs_001462a8" * (cast_expression "(code *)PTR_mbstowcs_001462a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,s,0)" ( number_literal , identifier , number_literal )))) ;) (if_statement "if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }" { (expression_statement "iVar3 = 4;" (assignment_expression "iVar3 = 4" identifier = number_literal) ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" else (compound_statement "{\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" { (expression_statement "iVar4 = iVar1 + 1;" (assignment_expression "iVar4 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "iVar3 = iVar4 * 4;" (assignment_expression "iVar3 = iVar4 * 4" identifier = (binary_expression "iVar4 * 4" identifier * number_literal)) ;) }))) (expression_statement "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);" (assignment_expression "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar3)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "(*(code *)PTR_mbstowcs_001462a8)(uVar2,s,iVar4);" (call_expression "(*(code *)PTR_mbstowcs_001462a8)(uVar2,s,iVar4)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" ( (pointer_expression "*(code *)PTR_mbstowcs_001462a8" * (cast_expression "(code *)PTR_mbstowcs_001462a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,s,iVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);" (assignment_expression "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" identifier = (call_expression "(*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" (parenthesized_expression "(*(code *)PTR_wcswidth_001462e0)" ( (pointer_expression "*(code *)PTR_wcswidth_001462e0" * (cast_expression "(code *)PTR_wcswidth_001462e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,iVar1)" ( identifier , identifier )))) ;) (expression_statement "(*(code *)PTR_free_001464fc)(uVar2);" (call_expression "(*(code *)PTR_free_001464fc)(uVar2)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar1 < 0) {\n    if ((s == (char *)0x0) || (*s == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (s[1] != '\0') {\n      if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    if ((s == (char *)0x0) || (*s == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (s[1] != '\0') {\n      if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" { (if_statement "if ((s == (char *)0x0) || (*s == '\0')) {\n      return 0;\n    }" if (parenthesized_expression "((s == (char *)0x0) || (*s == '\0'))" ( (binary_expression "(s == (char *)0x0) || (*s == '\0')" (parenthesized_expression "(s == (char *)0x0)" ( (binary_expression "s == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*s == '\0')" ( (binary_expression "*s == '\0'" (pointer_expression "*s" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (s[1] != '\0') {\n      if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" if (parenthesized_expression "(s[1] != '\0')" ( (binary_expression "s[1] != '\0'" (subscript_expression "s[1]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" { (if_statement "if (s[2] != '\0') {\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }" if (parenthesized_expression "(s[2] != '\0')" ( (binary_expression "s[2] != '\0'" (subscript_expression "s[2]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        iVar1 = (*(code *)PTR_strlen_00146390)(s);\n        return iVar1;\n      }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_00146390)(s);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_00146390)(s)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(s)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(s)" ( identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" identifier = number_literal) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_00048d98(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_00048d98(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00048d98(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);" (assignment_expression "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0)" identifier = (call_expression "(*(code *)PTR_mbstowcs_001462a8)(0,param_1,0)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" ( (pointer_expression "*(code *)PTR_mbstowcs_001462a8" * (cast_expression "(code *)PTR_mbstowcs_001462a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,param_1,0)" ( number_literal , identifier , number_literal )))) ;) (if_statement "if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" if (parenthesized_expression "(iVar1 == -1)" ( (binary_expression "iVar1 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }" { (expression_statement "iVar3 = 4;" (assignment_expression "iVar3 = 4" identifier = number_literal) ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" else (compound_statement "{\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" { (expression_statement "iVar4 = iVar1 + 1;" (assignment_expression "iVar4 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "iVar3 = iVar4 * 4;" (assignment_expression "iVar3 = iVar4 * 4" identifier = (binary_expression "iVar4 * 4" identifier * number_literal)) ;) }))) (expression_statement "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);" (assignment_expression "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar3)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "(*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);" (call_expression "(*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" ( (pointer_expression "*(code *)PTR_mbstowcs_001462a8" * (cast_expression "(code *)PTR_mbstowcs_001462a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_1,iVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);" (assignment_expression "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" identifier = (call_expression "(*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" (parenthesized_expression "(*(code *)PTR_wcswidth_001462e0)" ( (pointer_expression "*(code *)PTR_wcswidth_001462e0" * (cast_expression "(code *)PTR_wcswidth_001462e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,iVar1)" ( identifier , identifier )))) ;) (expression_statement "(*(code *)PTR_free_001464fc)(uVar2);" (call_expression "(*(code *)PTR_free_001464fc)(uVar2)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" { (if_statement "if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }" if (parenthesized_expression "((param_1 == (char *)0x0) || (*param_1 == '\0'))" ( (binary_expression "(param_1 == (char *)0x0) || (*param_1 == '\0')" (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" if (parenthesized_expression "(param_1[1] != '\0')" ( (binary_expression "param_1[1] != '\0'" (subscript_expression "param_1[1]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" { (if_statement "if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }" if (parenthesized_expression "(param_1[2] != '\0')" ( (binary_expression "param_1[2] != '\0'" (subscript_expression "param_1[2]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_00146390)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_00146390)(param_1)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" identifier = number_literal) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00048d98(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_00048d98(char *param_1)" (identifier "FUN_00048d98") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);\n  if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }\n  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);\n  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);\n  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);\n  (*(code *)PTR_free_001464fc)(uVar2);\n  if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);" (assignment_expression "iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_mbstowcs_001462a8)(0,param_1,0)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" (( "(") (pointer_expression "*(code *)PTR_mbstowcs_001462a8" (* "*") (cast_expression "(code *)PTR_mbstowcs_001462a8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mbstowcs_001462a8"))) () ")")) (argument_list "(0,param_1,0)" (( "(") (number_literal "0") (, ",") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == -1) {\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }\n  else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" (if "if") (parenthesized_expression "(iVar1 == -1)" (( "(") (binary_expression "iVar1 == -1" (identifier "iVar1") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    iVar3 = 4;\n    iVar4 = 1;\n    iVar1 = 0;\n  }" ({ "{") (expression_statement "iVar3 = 4;" (assignment_expression "iVar3 = 4" (identifier "iVar3") (= "=") (number_literal "4")) (; ";")) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" (else "else") (compound_statement "{\n    iVar4 = iVar1 + 1;\n    iVar3 = iVar4 * 4;\n  }" ({ "{") (expression_statement "iVar4 = iVar1 + 1;" (assignment_expression "iVar4 = iVar1 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar3 = iVar4 * 4;" (assignment_expression "iVar3 = iVar4 * 4" (identifier "iVar3") (= "=") (binary_expression "iVar4 * 4" (identifier "iVar4") (* "*") (number_literal "4"))) (; ";")) (} "}")))) (expression_statement "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);" (assignment_expression "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar3)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" (( "(") (pointer_expression "*(code *)PTR_xmalloc_001445b0" (* "*") (cast_expression "(code *)PTR_xmalloc_001445b0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xmalloc_001445b0"))) () ")")) (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "(*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);" (call_expression "(*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4)" (parenthesized_expression "(*(code *)PTR_mbstowcs_001462a8)" (( "(") (pointer_expression "*(code *)PTR_mbstowcs_001462a8" (* "*") (cast_expression "(code *)PTR_mbstowcs_001462a8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mbstowcs_001462a8"))) () ")")) (argument_list "(uVar2,param_1,iVar4)" (( "(") (identifier "uVar2") (, ",") (identifier "param_1") (, ",") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);" (assignment_expression "iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1)" (parenthesized_expression "(*(code *)PTR_wcswidth_001462e0)" (( "(") (pointer_expression "*(code *)PTR_wcswidth_001462e0" (* "*") (cast_expression "(code *)PTR_wcswidth_001462e0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wcswidth_001462e0"))) () ")")) (argument_list "(uVar2,iVar1)" (( "(") (identifier "uVar2") (, ",") (identifier "iVar1") () ")")))) (; ";")) (expression_statement "(*(code *)PTR_free_001464fc)(uVar2);" (call_expression "(*(code *)PTR_free_001464fc)(uVar2)" (parenthesized_expression "(*(code *)PTR_free_001464fc)" (( "(") (pointer_expression "*(code *)PTR_free_001464fc" (* "*") (cast_expression "(code *)PTR_free_001464fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_001464fc"))) () ")")) (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (if_statement "if (iVar1 < 0) {\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }\n    iVar1 = 1;\n    if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }\n  }" ({ "{") (if_statement "if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {\n      return 0;\n    }" (if "if") (parenthesized_expression "((param_1 == (char *)0x0) || (*param_1 == '\0'))" (( "(") (binary_expression "(param_1 == (char *)0x0) || (*param_1 == '\0')" (parenthesized_expression "(param_1 == (char *)0x0)" (( "(") (binary_expression "param_1 == (char *)0x0" (identifier "param_1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (if_statement "if (param_1[1] != '\0') {\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" (if "if") (parenthesized_expression "(param_1[1] != '\0')" (( "(") (binary_expression "param_1[1] != '\0'" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }\n      iVar1 = 2;\n    }" ({ "{") (if_statement "if (param_1[2] != '\0') {\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }" (if "if") (parenthesized_expression "(param_1[2] != '\0')" (( "(") (binary_expression "param_1[2] != '\0'" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n                    \n                    \n        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n        return iVar1;\n      }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_strlen_00146390)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_00146390)(param_1)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_strlen_00146390)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" (( "(") (pointer_expression "*(code *)PTR_strlen_00146390" (* "*") (cast_expression "(code *)PTR_strlen_00146390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00146390"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" (identifier "iVar1") (= "=") (number_literal "2")) (; ";")) (} "}"))) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

int function_1(char *var_3)

{
  int var_1;
  type_1 uVar2;
  int iVar3;
  int var_2;
  
  var_1 = (*(type_2 *)PTR_mbstowcs_001462a8)(0,var_3,0);
  if (var_1 == -1) {
    iVar3 = 4;
    var_2 = 1;
    var_1 = 0;
  }
  else {
    var_2 = var_1 + 1;
    iVar3 = var_2 * 4;
  }
  uVar2 = (*(type_2 *)PTR_xmalloc_001445b0)(iVar3);
  (*(type_2 *)PTR_mbstowcs_001462a8)(uVar2,var_3,var_2);
  var_1 = (*(type_2 *)PTR_wcswidth_001462e0)(uVar2,var_1);
  (*(type_2 *)PTR_free_001464fc)(uVar2);
  if (var_1 < 0) {
    if ((var_3 == (char *)0x0) || (*var_3 == '\0')) {
      return 0;
    }
    var_1 = 1;
    if (var_3[1] != '\0') {
      if (var_3[2] != '\0') {
        var_1 = (*(type_2 *)PTR_strlen_00146390)(var_3);
        return var_1;
      }
      var_1 = 2;
    }
  }
  return var_1;
}


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

int MASKED(char *param_1)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  iVar1 = (*(code *)PTR_mbstowcs_001462a8)(0,param_1,0);
  if (iVar1 == -1) {
    iVar3 = 4;
    iVar4 = 1;
    iVar1 = 0;
  }
  else {
    iVar4 = iVar1 + 1;
    iVar3 = iVar4 * 4;
  }
  uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar3);
  (*(code *)PTR_mbstowcs_001462a8)(uVar2,param_1,iVar4);
  iVar1 = (*(code *)PTR_wcswidth_001462e0)(uVar2,iVar1);
  (*(code *)PTR_free_001464fc)(uVar2);
  if (iVar1 < 0) {
    if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
      return 0;
    }
    iVar1 = 1;
    if (param_1[1] != '\0') {
      if (param_1[2] != '\0') {
                    /* WARNING: Could not recover jumptable at 0x00048ea8. Too many branches */
                    /* WARNING: Treating indirect jump as call */
        iVar1 = (*(code *)PTR_strlen_00146390)(param_1);
        return iVar1;
      }
      iVar1 = 2;
    }
  }
  return iVar1;
}

