
char * host_strduptrim(char *s)

{
  int *piVar1;
  int iVar2;
  char *pcVar3;
  char *pcVar4;
  uint uVar5;
  char *pcVar6;
  
  if (*s == '[') {
    uVar5 = (uint)s[1];
    pcVar6 = s + 1;
    if ((uVar5 != 0) && (uVar5 != 0x5d)) {
      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();
      iVar2 = 0;
      pcVar4 = pcVar6;
      do {
        pcVar3 = pcVar4;
        pcVar4 = pcVar3 + 1;
        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&
            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))
        goto LAB_00022b74;
      } while (uVar5 != 0x5d);
      if ((pcVar3[2] == '\0') && (1 < iVar2)) {
        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);
        return pcVar6;
      }
    }
  }
LAB_00022b74:
  pcVar6 = dupstr(s);
  return pcVar6;
}



void host_strduptrim(char *param_1)

{
  int *piVar1;
  int iVar2;
  char *pcVar3;
  char *pcVar4;
  uint uVar5;
  char *pcVar6;
  
  if (*param_1 == '[') {
    uVar5 = (uint)param_1[1];
    pcVar6 = param_1 + 1;
    if ((uVar5 != 0) && (uVar5 != 0x5d)) {
      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();
      iVar2 = 0;
      pcVar4 = pcVar6;
      do {
        pcVar3 = pcVar4;
        pcVar4 = pcVar3 + 1;
        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&
            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))
        goto LAB_00022b74;
      } while (uVar5 != 0x5d);
      if ((pcVar3[2] == '\0') && (1 < iVar2)) {
        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);
        return;
      }
    }
  }
LAB_00022b74:
  dupstr(param_1);
  return;
}


lui gp,0x9
addiu gp,gp,0x27c8
addu gp,gp,t9
addiu sp,sp,-0x30
li v0,0x5b
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw s1,0x28(sp)
sw s0,0x24(sp)
lb v1,0x0(a0)
bne v1,v0,0x00022b70
_nop
lb s0,0x1(a0)
beq s0,zero,0x00022b70
_addiu s1,a0,0x1
li v0,0x5d
beq s0,v0,0x00022b70
_lw t9,-0x7794(gp)
jalr t9
_sw a0,0x1c(sp)
or v1,zero,zero
lw gp,0x10(sp)
li t1,0x3a
lw a3,0x0(v0)
li t0,0x5d
or a1,s1,zero
b 0x00022b40
_lw a0,0x1c(sp)
beq s0,t0,0x00022b88
_nop
andi v0,s0,0xff
sll v0,v0,0x1
addu v0,a3,v0
lhu v0,0x0(v0)
andi v0,v0,0x10
bne v0,zero,0x00022b64
_addiu a1,a1,0x1
bne s0,t1,0x00022b70
_addiu v1,v1,0x1
lb s0,0x0(a1)
bne s0,zero,0x00022b38
_nop
lw ra,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
lw t9,-0x7fb4(gp)
b 0x000221dc
_addiu sp,sp,0x30
lb v0,0x1(a1)
bne v0,zero,0x00022b74
_lw ra,0x2c(sp)
slti v1,v1,0x2
bne v1,zero,0x00022b74
_subu a1,a1,s1
lw a0,-0x7fc8(gp)
lw ra,0x2c(sp)
or a2,s1,zero
lw s0,0x24(sp)
lw s1,0x28(sp)
addiu a0,a0,-0x1de0
lw t9,-0x7fb8(gp)
b 0x00022a38
_addiu sp,sp,0x30
(translation_unit "void host_strduptrim(char *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}\n\n" (function_definition "void host_strduptrim(char *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}" primitive_type (function_declarator "host_strduptrim(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 *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" 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 *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (if_statement "if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(*param_1 == '[')" ( (binary_expression "*param_1 == '['" (pointer_expression "*param_1" * identifier) == (char_literal "'['" ' character ')) )) (compound_statement "{\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }" { (expression_statement "uVar5 = (uint)param_1[1];" (assignment_expression "uVar5 = (uint)param_1[1]" identifier = (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "pcVar6 = param_1 + 1;" (assignment_expression "pcVar6 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }" if (parenthesized_expression "((uVar5 != 0) && (uVar5 != 0x5d))" ( (binary_expression "(uVar5 != 0) && (uVar5 != 0x5d)" (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar5 != 0x5d)" ( (binary_expression "uVar5 != 0x5d" identifier != number_literal) ))) )) (compound_statement "{\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }" { (expression_statement "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();" (assignment_expression "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_000adafc)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_000adafc)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_000adafc)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_000adafc" * (cast_expression "(code *)PTR___ctype_b_loc_000adafc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "pcVar4 = pcVar6;" (assignment_expression "pcVar4 = pcVar6" identifier = identifier) ;) (do_statement "do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);" do (compound_statement "{\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      }" { (expression_statement "pcVar3 = pcVar4;" (assignment_expression "pcVar3 = pcVar4" identifier = identifier) ;) (expression_statement "pcVar4 = pcVar3 + 1;" (assignment_expression "pcVar4 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (if_statement "if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;" if (parenthesized_expression "((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))" ( (binary_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0)" (parenthesized_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a))" ( (binary_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)" (parenthesized_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0)" ( (binary_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0" (parenthesized_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10)" ( (binary_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10" (pointer_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" * (cast_expression "(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + (uVar5 & 0xff) * 2)" ( (binary_expression "*piVar1 + (uVar5 & 0xff) * 2" (pointer_expression "*piVar1" * identifier) + (binary_expression "(uVar5 & 0xff) * 2" (parenthesized_expression "(uVar5 & 0xff)" ( (binary_expression "uVar5 & 0xff" identifier & number_literal) )) * number_literal)) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "(iVar2 = iVar2 + 1, uVar5 != 0x3a)" ( (comma_expression "iVar2 = iVar2 + 1, uVar5 != 0x3a" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) , (binary_expression "uVar5 != 0x3a" identifier != number_literal)) ))) )) || (parenthesized_expression "(uVar5 = (uint)*pcVar4, uVar5 == 0)" ( (comma_expression "uVar5 = (uint)*pcVar4, uVar5 == 0" (assignment_expression "uVar5 = (uint)*pcVar4" identifier = (binary_expression "(uint)*pcVar4" (parenthesized_expression "(uint)" ( identifier )) * identifier)) , (binary_expression "uVar5 == 0" identifier == number_literal)) ))) )) (goto_statement "goto LAB_00022b74;" goto statement_identifier ;)) }) while (parenthesized_expression "(uVar5 != 0x5d)" ( (binary_expression "uVar5 != 0x5d" identifier != number_literal) )) ;) (if_statement "if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }" if (parenthesized_expression "((pcVar3[2] == '\0') && (1 < iVar2))" ( (binary_expression "(pcVar3[2] == '\0') && (1 < iVar2)" (parenthesized_expression "(pcVar3[2] == '\0')" ( (binary_expression "pcVar3[2] == '\0'" (subscript_expression "pcVar3[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(1 < iVar2)" ( (binary_expression "1 < iVar2" number_literal < identifier) ))) )) (compound_statement "{\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }" { (expression_statement "dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);" (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" ( (binary_expression "PTR_DAT_000ad2c8 + -0x1de0" identifier + number_literal) , (binary_expression "(int)pcVar4 - (int)pcVar6" (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar6" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) (return_statement "return;" return ;) })) })) })) (labeled_statement "LAB_00022b74:\n  dupstr(param_1);" statement_identifier : (expression_statement "dupstr(param_1);" (call_expression "dupstr(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;)) (return_statement "return;" return ;) })))
(translation_unit "char * host_strduptrim(char *s)\n\n{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*s == '[') {\n    uVar5 = (uint)s[1];\n    pcVar6 = s + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }\n    }\n  }\nLAB_00022b74:\n  pcVar6 = dupstr(s);\n  return pcVar6;\n}\n\n" (function_definition "char * host_strduptrim(char *s)\n\n{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*s == '[') {\n    uVar5 = (uint)s[1];\n    pcVar6 = s + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }\n    }\n  }\nLAB_00022b74:\n  pcVar6 = dupstr(s);\n  return pcVar6;\n}" primitive_type (pointer_declarator "* host_strduptrim(char *s)" * (function_declarator "host_strduptrim(char *s)" identifier (parameter_list "(char *s)" ( (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*s == '[') {\n    uVar5 = (uint)s[1];\n    pcVar6 = s + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }\n    }\n  }\nLAB_00022b74:\n  pcVar6 = dupstr(s);\n  return pcVar6;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" 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 *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (if_statement "if (*s == '[') {\n    uVar5 = (uint)s[1];\n    pcVar6 = s + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }\n    }\n  }" if (parenthesized_expression "(*s == '[')" ( (binary_expression "*s == '['" (pointer_expression "*s" * identifier) == (char_literal "'['" ' character ')) )) (compound_statement "{\n    uVar5 = (uint)s[1];\n    pcVar6 = s + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }\n    }\n  }" { (expression_statement "uVar5 = (uint)s[1];" (assignment_expression "uVar5 = (uint)s[1]" identifier = (cast_expression "(uint)s[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "s[1]" identifier [ number_literal ]))) ;) (expression_statement "pcVar6 = s + 1;" (assignment_expression "pcVar6 = s + 1" identifier = (binary_expression "s + 1" identifier + number_literal)) ;) (if_statement "if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }\n    }" if (parenthesized_expression "((uVar5 != 0) && (uVar5 != 0x5d))" ( (binary_expression "(uVar5 != 0) && (uVar5 != 0x5d)" (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar5 != 0x5d)" ( (binary_expression "uVar5 != 0x5d" identifier != number_literal) ))) )) (compound_statement "{\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }\n    }" { (expression_statement "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();" (assignment_expression "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_000adafc)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_000adafc)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_000adafc)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_000adafc" * (cast_expression "(code *)PTR___ctype_b_loc_000adafc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "pcVar4 = pcVar6;" (assignment_expression "pcVar4 = pcVar6" identifier = identifier) ;) (do_statement "do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);" do (compound_statement "{\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      }" { (expression_statement "pcVar3 = pcVar4;" (assignment_expression "pcVar3 = pcVar4" identifier = identifier) ;) (expression_statement "pcVar4 = pcVar3 + 1;" (assignment_expression "pcVar4 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (if_statement "if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;" if (parenthesized_expression "((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))" ( (binary_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0)" (parenthesized_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a))" ( (binary_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)" (parenthesized_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0)" ( (binary_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0" (parenthesized_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10)" ( (binary_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10" (pointer_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" * (cast_expression "(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + (uVar5 & 0xff) * 2)" ( (binary_expression "*piVar1 + (uVar5 & 0xff) * 2" (pointer_expression "*piVar1" * identifier) + (binary_expression "(uVar5 & 0xff) * 2" (parenthesized_expression "(uVar5 & 0xff)" ( (binary_expression "uVar5 & 0xff" identifier & number_literal) )) * number_literal)) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "(iVar2 = iVar2 + 1, uVar5 != 0x3a)" ( (comma_expression "iVar2 = iVar2 + 1, uVar5 != 0x3a" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) , (binary_expression "uVar5 != 0x3a" identifier != number_literal)) ))) )) || (parenthesized_expression "(uVar5 = (uint)*pcVar4, uVar5 == 0)" ( (comma_expression "uVar5 = (uint)*pcVar4, uVar5 == 0" (assignment_expression "uVar5 = (uint)*pcVar4" identifier = (binary_expression "(uint)*pcVar4" (parenthesized_expression "(uint)" ( identifier )) * identifier)) , (binary_expression "uVar5 == 0" identifier == number_literal)) ))) )) (goto_statement "goto LAB_00022b74;" goto statement_identifier ;)) }) while (parenthesized_expression "(uVar5 != 0x5d)" ( (binary_expression "uVar5 != 0x5d" identifier != number_literal) )) ;) (if_statement "if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }" if (parenthesized_expression "((pcVar3[2] == '\0') && (1 < iVar2))" ( (binary_expression "(pcVar3[2] == '\0') && (1 < iVar2)" (parenthesized_expression "(pcVar3[2] == '\0')" ( (binary_expression "pcVar3[2] == '\0'" (subscript_expression "pcVar3[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(1 < iVar2)" ( (binary_expression "1 < iVar2" number_literal < identifier) ))) )) (compound_statement "{\n        pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return pcVar6;\n      }" { (expression_statement "pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);" (assignment_expression "pcVar6 = dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" identifier = (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" ( (binary_expression "PTR_DAT_000ad2c8 + -0x1de0" identifier + number_literal) , (binary_expression "(int)pcVar4 - (int)pcVar6" (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar6" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier )))) ;) (return_statement "return pcVar6;" return identifier ;) })) })) })) (labeled_statement "LAB_00022b74:\n  pcVar6 = dupstr(s);" statement_identifier : (expression_statement "pcVar6 = dupstr(s);" (assignment_expression "pcVar6 = dupstr(s)" identifier = (call_expression "dupstr(s)" identifier (argument_list "(s)" ( identifier )))) ;)) (return_statement "return pcVar6;" return identifier ;) })))
(translation_unit "void host_strduptrim(char *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}\n\n" (function_definition "void host_strduptrim(char *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}" primitive_type (function_declarator "host_strduptrim(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 *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" 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 *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (if_statement "if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(*param_1 == '[')" ( (binary_expression "*param_1 == '['" (pointer_expression "*param_1" * identifier) == (char_literal "'['" ' character ')) )) (compound_statement "{\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }" { (expression_statement "uVar5 = (uint)param_1[1];" (assignment_expression "uVar5 = (uint)param_1[1]" identifier = (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "pcVar6 = param_1 + 1;" (assignment_expression "pcVar6 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }" if (parenthesized_expression "((uVar5 != 0) && (uVar5 != 0x5d))" ( (binary_expression "(uVar5 != 0) && (uVar5 != 0x5d)" (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar5 != 0x5d)" ( (binary_expression "uVar5 != 0x5d" identifier != number_literal) ))) )) (compound_statement "{\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }" { (expression_statement "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();" (assignment_expression "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_000adafc)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_000adafc)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_000adafc)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_000adafc" * (cast_expression "(code *)PTR___ctype_b_loc_000adafc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "pcVar4 = pcVar6;" (assignment_expression "pcVar4 = pcVar6" identifier = identifier) ;) (do_statement "do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);" do (compound_statement "{\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      }" { (expression_statement "pcVar3 = pcVar4;" (assignment_expression "pcVar3 = pcVar4" identifier = identifier) ;) (expression_statement "pcVar4 = pcVar3 + 1;" (assignment_expression "pcVar4 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (if_statement "if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;" if (parenthesized_expression "((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))" ( (binary_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0)" (parenthesized_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a))" ( (binary_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)" (parenthesized_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0)" ( (binary_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0" (parenthesized_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10)" ( (binary_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10" (pointer_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" * (cast_expression "(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + (uVar5 & 0xff) * 2)" ( (binary_expression "*piVar1 + (uVar5 & 0xff) * 2" (pointer_expression "*piVar1" * identifier) + (binary_expression "(uVar5 & 0xff) * 2" (parenthesized_expression "(uVar5 & 0xff)" ( (binary_expression "uVar5 & 0xff" identifier & number_literal) )) * number_literal)) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "(iVar2 = iVar2 + 1, uVar5 != 0x3a)" ( (comma_expression "iVar2 = iVar2 + 1, uVar5 != 0x3a" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) , (binary_expression "uVar5 != 0x3a" identifier != number_literal)) ))) )) || (parenthesized_expression "(uVar5 = (uint)*pcVar4, uVar5 == 0)" ( (comma_expression "uVar5 = (uint)*pcVar4, uVar5 == 0" (assignment_expression "uVar5 = (uint)*pcVar4" identifier = (binary_expression "(uint)*pcVar4" (parenthesized_expression "(uint)" ( identifier )) * identifier)) , (binary_expression "uVar5 == 0" identifier == number_literal)) ))) )) (goto_statement "goto LAB_00022b74;" goto statement_identifier ;)) }) while (parenthesized_expression "(uVar5 != 0x5d)" ( (binary_expression "uVar5 != 0x5d" identifier != number_literal) )) ;) (if_statement "if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }" if (parenthesized_expression "((pcVar3[2] == '\0') && (1 < iVar2))" ( (binary_expression "(pcVar3[2] == '\0') && (1 < iVar2)" (parenthesized_expression "(pcVar3[2] == '\0')" ( (binary_expression "pcVar3[2] == '\0'" (subscript_expression "pcVar3[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(1 < iVar2)" ( (binary_expression "1 < iVar2" number_literal < identifier) ))) )) (compound_statement "{\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }" { (expression_statement "dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);" (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" ( (binary_expression "PTR_DAT_000ad2c8 + -0x1de0" identifier + number_literal) , (binary_expression "(int)pcVar4 - (int)pcVar6" (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar6" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) (return_statement "return;" return ;) })) })) })) (labeled_statement "LAB_00022b74:\n  dupstr(param_1);" statement_identifier : (expression_statement "dupstr(param_1);" (call_expression "dupstr(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;)) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) * LIT)) )))) & LIT) )) == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT + LIT)) , (binary_expression IDENT != LIT)) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) , (binary_expression IDENT == LIT)) ))) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) , IDENT ))) ;) (return_statement return ;) })) })) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (return_statement return ;) })))
(function_definition "void host_strduptrim(char *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "host_strduptrim(char *param_1)" (identifier "host_strduptrim") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  char *pcVar6;\n  \n  if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }\nLAB_00022b74:\n  dupstr(param_1);\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (if_statement "if (*param_1 == '[') {\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(*param_1 == '[')" (( "(") (binary_expression "*param_1 == '['" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'['" (' "'") (character "[") (' "'"))) () ")")) (compound_statement "{\n    uVar5 = (uint)param_1[1];\n    pcVar6 = param_1 + 1;\n    if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }\n  }" ({ "{") (expression_statement "uVar5 = (uint)param_1[1];" (assignment_expression "uVar5 = (uint)param_1[1]" (identifier "uVar5") (= "=") (cast_expression "(uint)param_1[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "pcVar6 = param_1 + 1;" (assignment_expression "pcVar6 = param_1 + 1" (identifier "pcVar6") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((uVar5 != 0) && (uVar5 != 0x5d)) {\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }" (if "if") (parenthesized_expression "((uVar5 != 0) && (uVar5 != 0x5d))" (( "(") (binary_expression "(uVar5 != 0) && (uVar5 != 0x5d)" (parenthesized_expression "(uVar5 != 0)" (( "(") (binary_expression "uVar5 != 0" (identifier "uVar5") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar5 != 0x5d)" (( "(") (binary_expression "uVar5 != 0x5d" (identifier "uVar5") (!= "!=") (number_literal "0x5d")) () ")"))) () ")")) (compound_statement "{\n      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();\n      iVar2 = 0;\n      pcVar4 = pcVar6;\n      do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);\n      if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }\n    }" ({ "{") (expression_statement "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();" (assignment_expression "piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)()" (identifier "piVar1") (= "=") (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_000adafc)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___ctype_b_loc_000adafc)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_000adafc)" (( "(") (pointer_expression "*(code *)PTR___ctype_b_loc_000adafc" (* "*") (cast_expression "(code *)PTR___ctype_b_loc_000adafc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___ctype_b_loc_000adafc"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar4 = pcVar6;" (assignment_expression "pcVar4 = pcVar6" (identifier "pcVar4") (= "=") (identifier "pcVar6")) (; ";")) (do_statement "do {\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      } while (uVar5 != 0x5d);" (do "do") (compound_statement "{\n        pcVar3 = pcVar4;\n        pcVar4 = pcVar3 + 1;\n        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;\n      }" ({ "{") (expression_statement "pcVar3 = pcVar4;" (assignment_expression "pcVar3 = pcVar4" (identifier "pcVar3") (= "=") (identifier "pcVar4")) (; ";")) (expression_statement "pcVar4 = pcVar3 + 1;" (assignment_expression "pcVar4 = pcVar3 + 1" (identifier "pcVar4") (= "=") (binary_expression "pcVar3 + 1" (identifier "pcVar3") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))\n        goto LAB_00022b74;" (if "if") (parenthesized_expression "((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))" (( "(") (binary_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0)" (parenthesized_expression "(((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a))" (( "(") (binary_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&\n            (iVar2 = iVar2 + 1, uVar5 != 0x3a)" (parenthesized_expression "((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0)" (( "(") (binary_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0" (parenthesized_expression "(*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10)" (( "(") (binary_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10" (pointer_expression "*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" (* "*") (cast_expression "(ushort *)(*piVar1 + (uVar5 & 0xff) * 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar1 + (uVar5 & 0xff) * 2)" (( "(") (binary_expression "*piVar1 + (uVar5 & 0xff) * 2" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (binary_expression "(uVar5 & 0xff) * 2" (parenthesized_expression "(uVar5 & 0xff)" (( "(") (binary_expression "uVar5 & 0xff" (identifier "uVar5") (& "&") (number_literal "0xff")) () ")")) (* "*") (number_literal "2"))) () ")")))) (& "&") (number_literal "0x10")) () ")")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = iVar2 + 1, uVar5 != 0x3a)" (( "(") (comma_expression "iVar2 = iVar2 + 1, uVar5 != 0x3a" (assignment_expression "iVar2 = iVar2 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (, ",") (binary_expression "uVar5 != 0x3a" (identifier "uVar5") (!= "!=") (number_literal "0x3a"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(uVar5 = (uint)*pcVar4, uVar5 == 0)" (( "(") (comma_expression "uVar5 = (uint)*pcVar4, uVar5 == 0" (assignment_expression "uVar5 = (uint)*pcVar4" (identifier "uVar5") (= "=") (binary_expression "(uint)*pcVar4" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pcVar4"))) (, ",") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0"))) () ")"))) () ")")) (goto_statement "goto LAB_00022b74;" (goto "goto") (statement_identifier "LAB_00022b74") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(uVar5 != 0x5d)" (( "(") (binary_expression "uVar5 != 0x5d" (identifier "uVar5") (!= "!=") (number_literal "0x5d")) () ")")) (; ";")) (if_statement "if ((pcVar3[2] == '\0') && (1 < iVar2)) {\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }" (if "if") (parenthesized_expression "((pcVar3[2] == '\0') && (1 < iVar2))" (( "(") (binary_expression "(pcVar3[2] == '\0') && (1 < iVar2)" (parenthesized_expression "(pcVar3[2] == '\0')" (( "(") (binary_expression "pcVar3[2] == '\0'" (subscript_expression "pcVar3[2]" (identifier "pcVar3") ([ "[") (number_literal "2") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(1 < iVar2)" (( "(") (binary_expression "1 < iVar2" (number_literal "1") (< "<") (identifier "iVar2")) () ")"))) () ")")) (compound_statement "{\n        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);\n        return;\n      }" ({ "{") (expression_statement "dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);" (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" (identifier "dupprintf") (argument_list "(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6)" (( "(") (binary_expression "PTR_DAT_000ad2c8 + -0x1de0" (identifier "PTR_DAT_000ad2c8") (+ "+") (number_literal "-0x1de0")) (, ",") (binary_expression "(int)pcVar4 - (int)pcVar6" (cast_expression "(int)pcVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar4")) (- "-") (cast_expression "(int)pcVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar6"))) (, ",") (identifier "pcVar6") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (} "}"))) (labeled_statement "LAB_00022b74:\n  dupstr(param_1);" (statement_identifier "LAB_00022b74") (: ":") (expression_statement "dupstr(param_1);" (call_expression "dupstr(param_1)" (identifier "dupstr") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

char * function_1(char *var_1)

{
  int *piVar1;
  int var_4;
  char *var_3;
  char *var_5;
  type_1 var_2;
  char *pcVar6;
  
  if (*var_1 == '[') {
    var_2 = (type_1)var_1[1];
    pcVar6 = var_1 + 1;
    if ((var_2 != 0) && (var_2 != 0x5d)) {
      piVar1 = (int *)(*(type_2 *)PTR___ctype_b_loc_000adafc)();
      var_4 = 0;
      var_5 = pcVar6;
      do {
        var_3 = var_5;
        var_5 = var_3 + 1;
        if ((((*(type_3 *)(*piVar1 + (var_2 & 0xff) * 2) & 0x10) == 0) &&
            (var_4 = var_4 + 1, var_2 != 0x3a)) || (var_2 = (type_1)*var_5, var_2 == 0))
        goto LAB_00022b74;
      } while (var_2 != 0x5d);
      if ((var_3[2] == '\0') && (1 < var_4)) {
        pcVar6 = var_6(var_7 + -0x1de0,(int)var_5 - (int)pcVar6,pcVar6);
        return pcVar6;
      }
    }
  }
LAB_00022b74:
  pcVar6 = var_8(var_1);
  return pcVar6;
}


(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: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (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))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))))) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (goto_statement label: (statement_identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) (identifier)))) (return_statement))))))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) (return_statement))))

void MASKED(char *param_1)

{
  int *piVar1;
  int iVar2;
  char *pcVar3;
  char *pcVar4;
  uint uVar5;
  char *pcVar6;
  
  if (*param_1 == '[') {
    uVar5 = (uint)param_1[1];
    pcVar6 = param_1 + 1;
    if ((uVar5 != 0) && (uVar5 != 0x5d)) {
      piVar1 = (int *)(*(code *)PTR___ctype_b_loc_000adafc)();
      iVar2 = 0;
      pcVar4 = pcVar6;
      do {
        pcVar3 = pcVar4;
        pcVar4 = pcVar3 + 1;
        if ((((*(ushort *)(*piVar1 + (uVar5 & 0xff) * 2) & 0x10) == 0) &&
            (iVar2 = iVar2 + 1, uVar5 != 0x3a)) || (uVar5 = (uint)*pcVar4, uVar5 == 0))
        goto LAB_00022b74;
      } while (uVar5 != 0x5d);
      if ((pcVar3[2] == '\0') && (1 < iVar2)) {
        dupprintf(PTR_DAT_000ad2c8 + -0x1de0,(int)pcVar4 - (int)pcVar6,pcVar6);
        return;
      }
    }
  }
LAB_00022b74:
  dupstr(param_1);
  return;
}

