
int demangle_template_template_parm(work_stuff *work,char **mangled,string *tname)

{
  undefined *puVar1;
  int iVar2;
  char *pcVar3;
  char cVar4;
  int iVar5;
  string temp;
  int r;
  undefined *local_38;
  char *local_34;
  code *local_30;
  
  string_append(tname,PTR_UINT_004c12dc + -0x6f28);
  iVar2 = get_count(mangled,&r);
  puVar1 = PTR_s__s_004c1a50;
  if (iVar2 == 0) {
    cVar4 = tname->p[-1];
    iVar2 = 1;
  }
  else {
    iVar2 = 1;
    if (0 < r) {
      local_38 = PTR_LAB_004c4fd8;
      iVar5 = 0;
      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);
      pcVar3 = *mangled;
      local_34 = PTR_UINT_004c12dc + -0x6f1c;
      cVar4 = *pcVar3;
      if (cVar4 == 'Z') goto LAB_00316a30;
      do {
        if (cVar4 == 'z') {
          *mangled = pcVar3 + 1;
          iVar2 = demangle_template_template_parm(work,mangled,tname);
          if (iVar2 == 0) goto LAB_00316a90;
        }
        else {
          iVar2 = do_type(work,mangled,&temp);
          if (iVar2 == 0) {
            if (temp.b == (char *)0x0) {
LAB_00316a90:
              iVar2 = 0;
            }
            else {
              (*(code *)PTR_free_004c5c18)();
              temp.p = (char *)0x0;
              temp.e = (char *)0x0;
              temp.b = (char *)0x0;
            }
            break;
          }
          (*local_30)(tname,&temp,temp.p);
          if (temp.b != (char *)0x0) {
            (*(code *)PTR_free_004c5c18)();
            temp.p = (char *)0x0;
            temp.e = (char *)0x0;
            temp.b = (char *)0x0;
          }
        }
        while( true ) {
          iVar5 = iVar5 + 1;
          if (r <= iVar5) goto LAB_0031693c;
          string_append(tname,puVar1 + 0x644c);
          pcVar3 = *mangled;
          cVar4 = *pcVar3;
          if (cVar4 != 'Z') break;
LAB_00316a30:
          *mangled = pcVar3 + 1;
          string_append(tname,local_34);
        }
      } while( true );
    }
LAB_0031693c:
    cVar4 = tname->p[-1];
  }
  if (cVar4 == '>') {
    string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c);
  }
  string_append(tname,PTR_UINT_004c12dc + -0x6f14);
  return iVar2;
}



int FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)

{
  undefined *puVar1;
  int iVar2;
  char *pcVar3;
  char cVar4;
  int iVar5;
  int local_48;
  undefined4 local_44;
  undefined4 local_40;
  int local_3c;
  undefined *local_38;
  undefined *local_34;
  code *local_30;
  
  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);
  iVar2 = FUN_003118a0(param_2,&local_3c);
  puVar1 = PTR_s__s_004c1a50;
  if (iVar2 == 0) {
    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);
    iVar2 = 1;
  }
  else {
    iVar2 = 1;
    if (0 < local_3c) {
      local_38 = PTR_LAB_004c4fd8;
      iVar5 = 0;
      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);
      pcVar3 = (char *)*param_2;
      local_34 = PTR_UINT_004c12dc + -0x6f1c;
      cVar4 = *pcVar3;
      if (cVar4 == 'Z') goto LAB_00316a30;
      while (cVar4 == 'z') {
        *param_2 = pcVar3 + 1;
        iVar2 = FUN_00316818(param_1,param_2,param_3);
        if (iVar2 == 0) goto LAB_00316a90;
LAB_003169ec:
        while( true ) {
          iVar5 = iVar5 + 1;
          if (local_3c <= iVar5) goto LAB_0031693c;
          FUN_00312594(param_3,puVar1 + 0x644c);
          pcVar3 = (char *)*param_2;
          cVar4 = *pcVar3;
          if (cVar4 != 'Z') break;
LAB_00316a30:
          *param_2 = pcVar3 + 1;
          FUN_00312594(param_3,local_34);
        }
      }
      iVar2 = FUN_0031439c(param_1,param_2,&local_48);
      if (iVar2 != 0) {
        (*local_30)(param_3,&local_48,local_44);
        if (local_48 != 0) {
          (*(code *)PTR_free_004c5c18)();
          local_44 = 0;
          local_40 = 0;
          local_48 = 0;
        }
        goto LAB_003169ec;
      }
      if (local_48 == 0) {
LAB_00316a90:
        iVar2 = 0;
      }
      else {
        (*(code *)PTR_free_004c5c18)();
        local_44 = 0;
        local_40 = 0;
        local_48 = 0;
      }
    }
LAB_0031693c:
    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);
  }
  if (cVar4 == '>') {
    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);
  }
  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);
  return iVar2;
}


lui gp,0x1b
addiu gp,gp,0x2a28
addu gp,gp,t9
addiu sp,sp,-0x60
sw s3,0x44(sp)
sw s0,0x38(sp)
or s0,a1,zero
lw s3,-0x4268(gp)
lw a1,-0x7f64(gp)
sw gp,0x10(sp)
addiu s3,s3,0x2594
sw ra,0x5c(sp)
addiu a1,a1,-0x6f28
sw s4,0x48(sp)
sw s2,0x40(sp)
or t9,s3,zero
sw s8,0x58(sp)
or s4,a0,zero
sw s7,0x54(sp)
or a0,a2,zero
sw s6,0x50(sp)
or s2,a2,zero
sw s5,0x4c(sp)
bal 0x00312594
_sw s1,0x3c(sp)
addiu a1,sp,0x24
lw gp,0x10(sp)
lw t9,-0x4268(gp)
addiu t9,t9,0x18a0
bal 0x003118a0
_or a0,s0,zero
beq v0,zero,0x00316998
_lw gp,0x10(sp)
lw v0,0x24(sp)
blez v0,0x0031693c
_li s8,0x1
lw v0,-0x4268(gp)
li t1,0x5a
lw v1,-0x4268(gp)
or s1,zero,zero
lw s7,-0x7f64(gp)
or a1,s0,zero
lw s6,-0x4268(gp)
or a0,s4,zero
sw v0,0x28(sp)
addiu v0,v1,0x27e8
lw v1,0x0(s0)
li t2,0x7a
lw s5,-0x77f0(gp)
addiu s6,s6,0x439c
sw v0,0x30(sp)
addiu v0,s7,-0x6f1c
addiu s7,sp,0x18
sw v0,0x2c(sp)
lb a3,0x0(v1)
beq a3,t1,0x00316a30
_or a2,s7,zero
beq a3,t2,0x003169c8
_or t9,s6,zero
bal 0x0031439c
_nop
lw gp,0x10(sp)
bne v0,zero,0x00316a50
_or s8,v0,zero
lw a0,0x18(sp)
beq a0,zero,0x00316a90
_lw t9,-0x3628(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw zero,0x1c(sp)
sw zero,0x20(sp)
sw zero,0x18(sp)
lw a0,0x4(s2)
li v1,0x3e
lb a0,-0x1(a0)
beq a0,v1,0x003169ac
_nop
lw a1,-0x7f64(gp)
or a0,s2,zero
or t9,s3,zero
bal 0x00312594
_addiu a1,a1,-0x6f14
or v0,s8,zero
lw ra,0x5c(sp)
lw s8,0x58(sp)
lw s7,0x54(sp)
lw s6,0x50(sp)
lw s5,0x4c(sp)
lw s4,0x48(sp)
lw s3,0x44(sp)
lw s2,0x40(sp)
lw s1,0x3c(sp)
lw s0,0x38(sp)
jr ra
_addiu sp,sp,0x60
lw a0,0x4(s2)
li v1,0x3e
lb a0,-0x1(a0)
bne a0,v1,0x00316950
_li s8,0x1
lw a1,-0x7924(gp)
or a0,s2,zero
or t9,s3,zero
bal 0x00312594
_addiu a1,a1,-0x8c
b 0x00316950
_lw gp,0x10(sp)
lw v0,0x28(sp)
addiu v1,v1,0x1
or a2,s2,zero
addiu t9,v0,0x6818
bal 0x00316818
_sw v1,0x0(s0)
lw gp,0x10(sp)
beq v0,zero,0x00316a90
_or s8,v0,zero
lw v1,0x24(sp)
addiu s1,s1,0x1
addiu a1,s5,0x644c
slt v1,s1,v1
beq v1,zero,0x0031693c
_or a0,s2,zero
or t9,s3,zero
bal 0x00312594
_addiu s7,sp,0x18
lw v1,0x0(s0)
li t1,0x5a
or a1,s0,zero
or a2,s7,zero
or a0,s4,zero
lb a3,0x0(v1)
bne a3,t1,0x003168fc
_li t2,0x7a
addiu v1,v1,0x1
lw a1,0x2c(sp)
or a0,s2,zero
or t9,s3,zero
bal 0x00312594
_sw v1,0x0(s0)
b 0x003169ec
_lw gp,0x10(sp)
lw a2,0x1c(sp)
or a0,s2,zero
lw t9,0x30(sp)
jalr t9
_or a1,s7,zero
lw a0,0x18(sp)
beq a0,zero,0x003169ec
_lw gp,0x10(sp)
lw t9,-0x3628(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw zero,0x1c(sp)
sw zero,0x20(sp)
b 0x003169ec
_sw zero,0x18(sp)
b 0x0031693c
_or s8,zero,zero
(translation_unit "int FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}\n\n" (function_definition "int FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" primitive_type (function_declarator "FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int local_48;" primitive_type identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "int local_3c;" primitive_type identifier ;) (declaration "undefined *local_38;" type_identifier (pointer_declarator "*local_38" * identifier) ;) (declaration "undefined *local_34;" type_identifier (pointer_declarator "*local_34" * identifier) ;) (declaration "code *local_30;" type_identifier (pointer_declarator "*local_30" * identifier) ;) (expression_statement "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);" (call_expression "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28)" identifier (argument_list "(param_3,PTR_UINT_004c12dc + -0x6f28)" ( identifier , (binary_expression "PTR_UINT_004c12dc + -0x6f28" identifier + number_literal) ))) ;) (expression_statement "iVar2 = FUN_003118a0(param_2,&local_3c);" (assignment_expression "iVar2 = FUN_003118a0(param_2,&local_3c)" identifier = (call_expression "FUN_003118a0(param_2,&local_3c)" identifier (argument_list "(param_2,&local_3c)" ( identifier , (pointer_expression "&local_3c" & identifier) )))) ;) (expression_statement "puVar1 = PTR_s__s_004c1a50;" (assignment_expression "puVar1 = PTR_s__s_004c1a50" identifier = identifier) ;) (if_statement "if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }" { (expression_statement "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" (assignment_expression "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1)" identifier = (pointer_expression "*(char *)(*(int *)(param_3 + 4) + -1)" * (cast_expression "(char *)(*(int *)(param_3 + 4) + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_3 + 4) + -1)" ( (binary_expression "*(int *)(param_3 + 4) + -1" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" else (compound_statement "{\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }" if (parenthesized_expression "(0 < local_3c)" ( (binary_expression "0 < local_3c" number_literal < identifier) )) (compound_statement "{\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }" { (expression_statement "local_38 = PTR_LAB_004c4fd8;" (assignment_expression "local_38 = PTR_LAB_004c4fd8" identifier = identifier) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);" (assignment_expression "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8)" identifier = (cast_expression "(code *)(PTR_LAB_004c4fd8 + 0x27e8)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_004c4fd8 + 0x27e8)" ( (binary_expression "PTR_LAB_004c4fd8 + 0x27e8" identifier + number_literal) )))) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "local_34 = PTR_UINT_004c12dc + -0x6f1c;" (assignment_expression "local_34 = PTR_UINT_004c12dc + -0x6f1c" identifier = (binary_expression "PTR_UINT_004c12dc + -0x6f1c" identifier + number_literal)) ;) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar4 == 'Z') goto LAB_00316a30;" if (parenthesized_expression "(cVar4 == 'Z')" ( (binary_expression "cVar4 == 'Z'" identifier == (char_literal "'Z'" ' character ')) )) (goto_statement "goto LAB_00316a30;" goto statement_identifier ;)) (while_statement "while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }" while (parenthesized_expression "(cVar4 == 'z')" ( (binary_expression "cVar4 == 'z'" identifier == (char_literal "'z'" ' character ')) )) (compound_statement "{\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }" { (expression_statement "*param_2 = pcVar3 + 1;" (assignment_expression "*param_2 = pcVar3 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = FUN_00316818(param_1,param_2,param_3);" (assignment_expression "iVar2 = FUN_00316818(param_1,param_2,param_3)" identifier = (call_expression "FUN_00316818(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) goto LAB_00316a90;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00316a90;" goto statement_identifier ;)) (labeled_statement "LAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" statement_identifier : (while_statement "while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (local_3c <= iVar5) goto LAB_0031693c;" if (parenthesized_expression "(local_3c <= iVar5)" ( (binary_expression "local_3c <= iVar5" identifier <= identifier) )) (goto_statement "goto LAB_0031693c;" goto statement_identifier ;)) (expression_statement "FUN_00312594(param_3,puVar1 + 0x644c);" (call_expression "FUN_00312594(param_3,puVar1 + 0x644c)" identifier (argument_list "(param_3,puVar1 + 0x644c)" ( identifier , (binary_expression "puVar1 + 0x644c" identifier + number_literal) ))) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar4 != 'Z') break;" if (parenthesized_expression "(cVar4 != 'Z')" ( (binary_expression "cVar4 != 'Z'" identifier != (char_literal "'Z'" ' character ')) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00316a30:\n          *param_2 = pcVar3 + 1;" statement_identifier : (expression_statement "*param_2 = pcVar3 + 1;" (assignment_expression "*param_2 = pcVar3 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;)) (expression_statement "FUN_00312594(param_3,local_34);" (call_expression "FUN_00312594(param_3,local_34)" identifier (argument_list "(param_3,local_34)" ( identifier , identifier ))) ;) }))) })) (expression_statement "iVar2 = FUN_0031439c(param_1,param_2,&local_48);" (assignment_expression "iVar2 = FUN_0031439c(param_1,param_2,&local_48)" identifier = (call_expression "FUN_0031439c(param_1,param_2,&local_48)" identifier (argument_list "(param_1,param_2,&local_48)" ( identifier , identifier , (pointer_expression "&local_48" & identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }" { (expression_statement "(*local_30)(param_3,&local_48,local_44);" (call_expression "(*local_30)(param_3,&local_48,local_44)" (parenthesized_expression "(*local_30)" ( (pointer_expression "*local_30" * identifier) )) (argument_list "(param_3,&local_48,local_44)" ( identifier , (pointer_expression "&local_48" & identifier) , identifier ))) ;) (if_statement "if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }" if (parenthesized_expression "(local_48 != 0)" ( (binary_expression "local_48 != 0" identifier != number_literal) )) (compound_statement "{\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }" { (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" ( (pointer_expression "*(code *)PTR_free_004c5c18" * (cast_expression "(code *)PTR_free_004c5c18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) })) (goto_statement "goto LAB_003169ec;" goto statement_identifier ;) })) (if_statement "if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" if (parenthesized_expression "(local_48 == 0)" ( (binary_expression "local_48 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00316a90:\n        iVar2 = 0;\n      }" { (labeled_statement "LAB_00316a90:\n        iVar2 = 0;" statement_identifier : (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;)) }) (else_clause "else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" else (compound_statement "{\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" { (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" ( (pointer_expression "*(code *)PTR_free_004c5c18" * (cast_expression "(code *)PTR_free_004c5c18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) }))) })) (labeled_statement "LAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" statement_identifier : (expression_statement "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" (assignment_expression "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1)" identifier = (pointer_expression "*(char *)(*(int *)(param_3 + 4) + -1)" * (cast_expression "(char *)(*(int *)(param_3 + 4) + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_3 + 4) + -1)" ( (binary_expression "*(int *)(param_3 + 4) + -1" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) ))))) ;)) }))) (if_statement "if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" if (parenthesized_expression "(cVar4 == '>')" ( (binary_expression "cVar4 == '>'" identifier == (char_literal "'>'" ' character ')) )) (compound_statement "{\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" { (expression_statement "FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);" (call_expression "FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c)" identifier (argument_list "(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c)" ( identifier , (binary_expression "PTR_s_in_a_linker_script_004c191c + -0x8c" identifier + number_literal) ))) ;) })) (expression_statement "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);" (call_expression "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14)" identifier (argument_list "(param_3,PTR_UINT_004c12dc + -0x6f14)" ( identifier , (binary_expression "PTR_UINT_004c12dc + -0x6f14" identifier + number_literal) ))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int demangle_template_template_parm(work_stuff *work,char **mangled,string *tname)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  string temp;\n  int r;\n  undefined *local_38;\n  char *local_34;\n  code *local_30;\n  \n  string_append(tname,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = get_count(mangled,&r);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = tname->p[-1];\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < r) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }\nLAB_0031693c:\n    cVar4 = tname->p[-1];\n  }\n  if (cVar4 == '>') {\n    string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  string_append(tname,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}\n\n" (function_definition "int demangle_template_template_parm(work_stuff *work,char **mangled,string *tname)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  string temp;\n  int r;\n  undefined *local_38;\n  char *local_34;\n  code *local_30;\n  \n  string_append(tname,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = get_count(mangled,&r);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = tname->p[-1];\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < r) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }\nLAB_0031693c:\n    cVar4 = tname->p[-1];\n  }\n  if (cVar4 == '>') {\n    string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  string_append(tname,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" primitive_type (function_declarator "demangle_template_template_parm(work_stuff *work,char **mangled,string *tname)" identifier (parameter_list "(work_stuff *work,char **mangled,string *tname)" ( (parameter_declaration "work_stuff *work" type_identifier (pointer_declarator "*work" * identifier)) , (parameter_declaration "char **mangled" primitive_type (pointer_declarator "**mangled" * (pointer_declarator "*mangled" * identifier))) , (parameter_declaration "string *tname" type_identifier (pointer_declarator "*tname" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  string temp;\n  int r;\n  undefined *local_38;\n  char *local_34;\n  code *local_30;\n  \n  string_append(tname,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = get_count(mangled,&r);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = tname->p[-1];\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < r) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }\nLAB_0031693c:\n    cVar4 = tname->p[-1];\n  }\n  if (cVar4 == '>') {\n    string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  string_append(tname,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "string temp;" type_identifier identifier ;) (declaration "int r;" primitive_type identifier ;) (declaration "undefined *local_38;" type_identifier (pointer_declarator "*local_38" * identifier) ;) (declaration "char *local_34;" primitive_type (pointer_declarator "*local_34" * identifier) ;) (declaration "code *local_30;" type_identifier (pointer_declarator "*local_30" * identifier) ;) (expression_statement "string_append(tname,PTR_UINT_004c12dc + -0x6f28);" (call_expression "string_append(tname,PTR_UINT_004c12dc + -0x6f28)" identifier (argument_list "(tname,PTR_UINT_004c12dc + -0x6f28)" ( identifier , (binary_expression "PTR_UINT_004c12dc + -0x6f28" identifier + number_literal) ))) ;) (expression_statement "iVar2 = get_count(mangled,&r);" (assignment_expression "iVar2 = get_count(mangled,&r)" identifier = (call_expression "get_count(mangled,&r)" identifier (argument_list "(mangled,&r)" ( identifier , (pointer_expression "&r" & identifier) )))) ;) (expression_statement "puVar1 = PTR_s__s_004c1a50;" (assignment_expression "puVar1 = PTR_s__s_004c1a50" identifier = identifier) ;) (if_statement "if (iVar2 == 0) {\n    cVar4 = tname->p[-1];\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < r) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }\nLAB_0031693c:\n    cVar4 = tname->p[-1];\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    cVar4 = tname->p[-1];\n    iVar2 = 1;\n  }" { (expression_statement "cVar4 = tname->p[-1];" (assignment_expression "cVar4 = tname->p[-1]" identifier = (subscript_expression "tname->p[-1]" (field_expression "tname->p" identifier -> field_identifier) [ number_literal ])) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = 1;\n    if (0 < r) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }\nLAB_0031693c:\n    cVar4 = tname->p[-1];\n  }" else (compound_statement "{\n    iVar2 = 1;\n    if (0 < r) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }\nLAB_0031693c:\n    cVar4 = tname->p[-1];\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (0 < r) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }" if (parenthesized_expression "(0 < r)" ( (binary_expression "0 < r" number_literal < identifier) )) (compound_statement "{\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = *mangled;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );\n    }" { (expression_statement "local_38 = PTR_LAB_004c4fd8;" (assignment_expression "local_38 = PTR_LAB_004c4fd8" identifier = identifier) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);" (assignment_expression "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8)" identifier = (cast_expression "(code *)(PTR_LAB_004c4fd8 + 0x27e8)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_004c4fd8 + 0x27e8)" ( (binary_expression "PTR_LAB_004c4fd8 + 0x27e8" identifier + number_literal) )))) ;) (expression_statement "pcVar3 = *mangled;" (assignment_expression "pcVar3 = *mangled" identifier = (pointer_expression "*mangled" * identifier)) ;) (expression_statement "local_34 = PTR_UINT_004c12dc + -0x6f1c;" (assignment_expression "local_34 = PTR_UINT_004c12dc + -0x6f1c" identifier = (binary_expression "PTR_UINT_004c12dc + -0x6f1c" identifier + number_literal)) ;) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar4 == 'Z') goto LAB_00316a30;" if (parenthesized_expression "(cVar4 == 'Z')" ( (binary_expression "cVar4 == 'Z'" identifier == (char_literal "'Z'" ' character ')) )) (goto_statement "goto LAB_00316a30;" goto statement_identifier ;)) (do_statement "do {\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      } while( true );" do (compound_statement "{\n        if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }\n      }" { (if_statement "if (cVar4 == 'z') {\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }\n        else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }" if (parenthesized_expression "(cVar4 == 'z')" ( (binary_expression "cVar4 == 'z'" identifier == (char_literal "'z'" ' character ')) )) (compound_statement "{\n          *mangled = pcVar3 + 1;\n          iVar2 = demangle_template_template_parm(work,mangled,tname);\n          if (iVar2 == 0) goto LAB_00316a90;\n        }" { (expression_statement "*mangled = pcVar3 + 1;" (assignment_expression "*mangled = pcVar3 + 1" (pointer_expression "*mangled" * identifier) = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = demangle_template_template_parm(work,mangled,tname);" (assignment_expression "iVar2 = demangle_template_template_parm(work,mangled,tname)" identifier = (call_expression "demangle_template_template_parm(work,mangled,tname)" identifier (argument_list "(work,mangled,tname)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) goto LAB_00316a90;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00316a90;" goto statement_identifier ;)) }) (else_clause "else {\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }" else (compound_statement "{\n          iVar2 = do_type(work,mangled,&temp);\n          if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }\n          (*local_30)(tname,&temp,temp.p);\n          if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }\n        }" { (expression_statement "iVar2 = do_type(work,mangled,&temp);" (assignment_expression "iVar2 = do_type(work,mangled,&temp)" identifier = (call_expression "do_type(work,mangled,&temp)" identifier (argument_list "(work,mangled,&temp)" ( identifier , identifier , (pointer_expression "&temp" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }\n            break;\n          }" { (if_statement "if (temp.b == (char *)0x0) {\nLAB_00316a90:\n              iVar2 = 0;\n            }\n            else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }" if (parenthesized_expression "(temp.b == (char *)0x0)" ( (binary_expression "temp.b == (char *)0x0" (field_expression "temp.b" identifier . field_identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00316a90:\n              iVar2 = 0;\n            }" { (labeled_statement "LAB_00316a90:\n              iVar2 = 0;" statement_identifier : (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;)) }) (else_clause "else {\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }" else (compound_statement "{\n              (*(code *)PTR_free_004c5c18)();\n              temp.p = (char *)0x0;\n              temp.e = (char *)0x0;\n              temp.b = (char *)0x0;\n            }" { (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" ( (pointer_expression "*(code *)PTR_free_004c5c18" * (cast_expression "(code *)PTR_free_004c5c18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "temp.p = (char *)0x0;" (assignment_expression "temp.p = (char *)0x0" (field_expression "temp.p" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "temp.e = (char *)0x0;" (assignment_expression "temp.e = (char *)0x0" (field_expression "temp.e" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "temp.b = (char *)0x0;" (assignment_expression "temp.b = (char *)0x0" (field_expression "temp.b" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) (break_statement "break;" break ;) })) (expression_statement "(*local_30)(tname,&temp,temp.p);" (call_expression "(*local_30)(tname,&temp,temp.p)" (parenthesized_expression "(*local_30)" ( (pointer_expression "*local_30" * identifier) )) (argument_list "(tname,&temp,temp.p)" ( identifier , (pointer_expression "&temp" & identifier) , (field_expression "temp.p" identifier . field_identifier) ))) ;) (if_statement "if (temp.b != (char *)0x0) {\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }" if (parenthesized_expression "(temp.b != (char *)0x0)" ( (binary_expression "temp.b != (char *)0x0" (field_expression "temp.b" identifier . field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            (*(code *)PTR_free_004c5c18)();\n            temp.p = (char *)0x0;\n            temp.e = (char *)0x0;\n            temp.b = (char *)0x0;\n          }" { (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" ( (pointer_expression "*(code *)PTR_free_004c5c18" * (cast_expression "(code *)PTR_free_004c5c18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "temp.p = (char *)0x0;" (assignment_expression "temp.p = (char *)0x0" (field_expression "temp.p" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "temp.e = (char *)0x0;" (assignment_expression "temp.e = (char *)0x0" (field_expression "temp.e" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "temp.b = (char *)0x0;" (assignment_expression "temp.b = (char *)0x0" (field_expression "temp.b" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) }))) (while_statement "while( true ) {\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar5 = iVar5 + 1;\n          if (r <= iVar5) goto LAB_0031693c;\n          string_append(tname,puVar1 + 0x644c);\n          pcVar3 = *mangled;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *mangled = pcVar3 + 1;\n          string_append(tname,local_34);\n        }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (r <= iVar5) goto LAB_0031693c;" if (parenthesized_expression "(r <= iVar5)" ( (binary_expression "r <= iVar5" identifier <= identifier) )) (goto_statement "goto LAB_0031693c;" goto statement_identifier ;)) (expression_statement "string_append(tname,puVar1 + 0x644c);" (call_expression "string_append(tname,puVar1 + 0x644c)" identifier (argument_list "(tname,puVar1 + 0x644c)" ( identifier , (binary_expression "puVar1 + 0x644c" identifier + number_literal) ))) ;) (expression_statement "pcVar3 = *mangled;" (assignment_expression "pcVar3 = *mangled" identifier = (pointer_expression "*mangled" * identifier)) ;) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar4 != 'Z') break;" if (parenthesized_expression "(cVar4 != 'Z')" ( (binary_expression "cVar4 != 'Z'" identifier != (char_literal "'Z'" ' character ')) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00316a30:\n          *mangled = pcVar3 + 1;" statement_identifier : (expression_statement "*mangled = pcVar3 + 1;" (assignment_expression "*mangled = pcVar3 + 1" (pointer_expression "*mangled" * identifier) = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;)) (expression_statement "string_append(tname,local_34);" (call_expression "string_append(tname,local_34)" identifier (argument_list "(tname,local_34)" ( identifier , identifier ))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) (labeled_statement "LAB_0031693c:\n    cVar4 = tname->p[-1];" statement_identifier : (expression_statement "cVar4 = tname->p[-1];" (assignment_expression "cVar4 = tname->p[-1]" identifier = (subscript_expression "tname->p[-1]" (field_expression "tname->p" identifier -> field_identifier) [ number_literal ])) ;)) }))) (if_statement "if (cVar4 == '>') {\n    string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" if (parenthesized_expression "(cVar4 == '>')" ( (binary_expression "cVar4 == '>'" identifier == (char_literal "'>'" ' character ')) )) (compound_statement "{\n    string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" { (expression_statement "string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c);" (call_expression "string_append(tname,PTR_s_in_a_linker_script_004c191c + -0x8c)" identifier (argument_list "(tname,PTR_s_in_a_linker_script_004c191c + -0x8c)" ( identifier , (binary_expression "PTR_s_in_a_linker_script_004c191c + -0x8c" identifier + number_literal) ))) ;) })) (expression_statement "string_append(tname,PTR_UINT_004c12dc + -0x6f14);" (call_expression "string_append(tname,PTR_UINT_004c12dc + -0x6f14)" identifier (argument_list "(tname,PTR_UINT_004c12dc + -0x6f14)" ( identifier , (binary_expression "PTR_UINT_004c12dc + -0x6f14" identifier + number_literal) ))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}\n\n" (function_definition "int FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" primitive_type (function_declarator "FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int local_48;" primitive_type identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "int local_3c;" primitive_type identifier ;) (declaration "undefined *local_38;" type_identifier (pointer_declarator "*local_38" * identifier) ;) (declaration "undefined *local_34;" type_identifier (pointer_declarator "*local_34" * identifier) ;) (declaration "code *local_30;" type_identifier (pointer_declarator "*local_30" * identifier) ;) (expression_statement "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);" (call_expression "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28)" identifier (argument_list "(param_3,PTR_UINT_004c12dc + -0x6f28)" ( identifier , (binary_expression "PTR_UINT_004c12dc + -0x6f28" identifier + number_literal) ))) ;) (expression_statement "iVar2 = FUN_003118a0(param_2,&local_3c);" (assignment_expression "iVar2 = FUN_003118a0(param_2,&local_3c)" identifier = (call_expression "FUN_003118a0(param_2,&local_3c)" identifier (argument_list "(param_2,&local_3c)" ( identifier , (pointer_expression "&local_3c" & identifier) )))) ;) (expression_statement "puVar1 = PTR_s__s_004c1a50;" (assignment_expression "puVar1 = PTR_s__s_004c1a50" identifier = identifier) ;) (if_statement "if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }" { (expression_statement "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" (assignment_expression "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1)" identifier = (pointer_expression "*(char *)(*(int *)(param_3 + 4) + -1)" * (cast_expression "(char *)(*(int *)(param_3 + 4) + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_3 + 4) + -1)" ( (binary_expression "*(int *)(param_3 + 4) + -1" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" else (compound_statement "{\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }" if (parenthesized_expression "(0 < local_3c)" ( (binary_expression "0 < local_3c" number_literal < identifier) )) (compound_statement "{\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }" { (expression_statement "local_38 = PTR_LAB_004c4fd8;" (assignment_expression "local_38 = PTR_LAB_004c4fd8" identifier = identifier) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);" (assignment_expression "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8)" identifier = (cast_expression "(code *)(PTR_LAB_004c4fd8 + 0x27e8)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_004c4fd8 + 0x27e8)" ( (binary_expression "PTR_LAB_004c4fd8 + 0x27e8" identifier + number_literal) )))) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "local_34 = PTR_UINT_004c12dc + -0x6f1c;" (assignment_expression "local_34 = PTR_UINT_004c12dc + -0x6f1c" identifier = (binary_expression "PTR_UINT_004c12dc + -0x6f1c" identifier + number_literal)) ;) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar4 == 'Z') goto LAB_00316a30;" if (parenthesized_expression "(cVar4 == 'Z')" ( (binary_expression "cVar4 == 'Z'" identifier == (char_literal "'Z'" ' character ')) )) (goto_statement "goto LAB_00316a30;" goto statement_identifier ;)) (while_statement "while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }" while (parenthesized_expression "(cVar4 == 'z')" ( (binary_expression "cVar4 == 'z'" identifier == (char_literal "'z'" ' character ')) )) (compound_statement "{\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }" { (expression_statement "*param_2 = pcVar3 + 1;" (assignment_expression "*param_2 = pcVar3 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = FUN_00316818(param_1,param_2,param_3);" (assignment_expression "iVar2 = FUN_00316818(param_1,param_2,param_3)" identifier = (call_expression "FUN_00316818(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) goto LAB_00316a90;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00316a90;" goto statement_identifier ;)) (labeled_statement "LAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" statement_identifier : (while_statement "while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (local_3c <= iVar5) goto LAB_0031693c;" if (parenthesized_expression "(local_3c <= iVar5)" ( (binary_expression "local_3c <= iVar5" identifier <= identifier) )) (goto_statement "goto LAB_0031693c;" goto statement_identifier ;)) (expression_statement "FUN_00312594(param_3,puVar1 + 0x644c);" (call_expression "FUN_00312594(param_3,puVar1 + 0x644c)" identifier (argument_list "(param_3,puVar1 + 0x644c)" ( identifier , (binary_expression "puVar1 + 0x644c" identifier + number_literal) ))) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar4 != 'Z') break;" if (parenthesized_expression "(cVar4 != 'Z')" ( (binary_expression "cVar4 != 'Z'" identifier != (char_literal "'Z'" ' character ')) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00316a30:\n          *param_2 = pcVar3 + 1;" statement_identifier : (expression_statement "*param_2 = pcVar3 + 1;" (assignment_expression "*param_2 = pcVar3 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;)) (expression_statement "FUN_00312594(param_3,local_34);" (call_expression "FUN_00312594(param_3,local_34)" identifier (argument_list "(param_3,local_34)" ( identifier , identifier ))) ;) }))) })) (expression_statement "iVar2 = FUN_0031439c(param_1,param_2,&local_48);" (assignment_expression "iVar2 = FUN_0031439c(param_1,param_2,&local_48)" identifier = (call_expression "FUN_0031439c(param_1,param_2,&local_48)" identifier (argument_list "(param_1,param_2,&local_48)" ( identifier , identifier , (pointer_expression "&local_48" & identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }" { (expression_statement "(*local_30)(param_3,&local_48,local_44);" (call_expression "(*local_30)(param_3,&local_48,local_44)" (parenthesized_expression "(*local_30)" ( (pointer_expression "*local_30" * identifier) )) (argument_list "(param_3,&local_48,local_44)" ( identifier , (pointer_expression "&local_48" & identifier) , identifier ))) ;) (if_statement "if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }" if (parenthesized_expression "(local_48 != 0)" ( (binary_expression "local_48 != 0" identifier != number_literal) )) (compound_statement "{\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }" { (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" ( (pointer_expression "*(code *)PTR_free_004c5c18" * (cast_expression "(code *)PTR_free_004c5c18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) })) (goto_statement "goto LAB_003169ec;" goto statement_identifier ;) })) (if_statement "if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" if (parenthesized_expression "(local_48 == 0)" ( (binary_expression "local_48 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00316a90:\n        iVar2 = 0;\n      }" { (labeled_statement "LAB_00316a90:\n        iVar2 = 0;" statement_identifier : (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;)) }) (else_clause "else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" else (compound_statement "{\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" { (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" ( (pointer_expression "*(code *)PTR_free_004c5c18" * (cast_expression "(code *)PTR_free_004c5c18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) }))) })) (labeled_statement "LAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" statement_identifier : (expression_statement "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" (assignment_expression "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1)" identifier = (pointer_expression "*(char *)(*(int *)(param_3 + 4) + -1)" * (cast_expression "(char *)(*(int *)(param_3 + 4) + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_3 + 4) + -1)" ( (binary_expression "*(int *)(param_3 + 4) + -1" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) ))))) ;)) }))) (if_statement "if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" if (parenthesized_expression "(cVar4 == '>')" ( (binary_expression "cVar4 == '>'" identifier == (char_literal "'>'" ' character ')) )) (compound_statement "{\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" { (expression_statement "FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);" (call_expression "FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c)" identifier (argument_list "(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c)" ( identifier , (binary_expression "PTR_s_in_a_linker_script_004c191c + -0x8c" identifier + number_literal) ))) ;) })) (expression_statement "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);" (call_expression "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14)" identifier (argument_list "(param_3,PTR_UINT_004c12dc + -0x6f14)" ( identifier , (binary_expression "PTR_UINT_004c12dc + -0x6f14" identifier + number_literal) ))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) (goto_statement goto statement_identifier ;)) (while_statement while (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) (break_statement break ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) }))) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , (pointer_expression & IDENT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (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 = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }) (else_clause else (compound_statement { (expression_statement (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 = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" (primitive_type "int") (function_declarator "FUN_00316818(undefined4 param_1,undefined4 *param_2,int param_3)" (identifier "FUN_00316818") (parameter_list "(undefined4 param_1,undefined4 *param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char *pcVar3;\n  char cVar4;\n  int iVar5;\n  int local_48;\n  undefined4 local_44;\n  undefined4 local_40;\n  int local_3c;\n  undefined *local_38;\n  undefined *local_34;\n  code *local_30;\n  \n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);\n  iVar2 = FUN_003118a0(param_2,&local_3c);\n  puVar1 = PTR_s__s_004c1a50;\n  if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }\n  if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }\n  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);\n  return iVar2;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "char cVar4;" (primitive_type "char") (identifier "cVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int local_48;" (primitive_type "int") (identifier "local_48") (; ";")) (declaration "undefined4 local_44;" (type_identifier "undefined4") (identifier "local_44") (; ";")) (declaration "undefined4 local_40;" (type_identifier "undefined4") (identifier "local_40") (; ";")) (declaration "int local_3c;" (primitive_type "int") (identifier "local_3c") (; ";")) (declaration "undefined *local_38;" (type_identifier "undefined") (pointer_declarator "*local_38" (* "*") (identifier "local_38")) (; ";")) (declaration "undefined *local_34;" (type_identifier "undefined") (pointer_declarator "*local_34" (* "*") (identifier "local_34")) (; ";")) (declaration "code *local_30;" (type_identifier "code") (pointer_declarator "*local_30" (* "*") (identifier "local_30")) (; ";")) (expression_statement "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);" (call_expression "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28)" (identifier "FUN_00312594") (argument_list "(param_3,PTR_UINT_004c12dc + -0x6f28)" (( "(") (identifier "param_3") (, ",") (binary_expression "PTR_UINT_004c12dc + -0x6f28" (identifier "PTR_UINT_004c12dc") (+ "+") (number_literal "-0x6f28")) () ")"))) (; ";")) (expression_statement "iVar2 = FUN_003118a0(param_2,&local_3c);" (assignment_expression "iVar2 = FUN_003118a0(param_2,&local_3c)" (identifier "iVar2") (= "=") (call_expression "FUN_003118a0(param_2,&local_3c)" (identifier "FUN_003118a0") (argument_list "(param_2,&local_3c)" (( "(") (identifier "param_2") (, ",") (pointer_expression "&local_3c" (& "&") (identifier "local_3c")) () ")")))) (; ";")) (expression_statement "puVar1 = PTR_s__s_004c1a50;" (assignment_expression "puVar1 = PTR_s__s_004c1a50" (identifier "puVar1") (= "=") (identifier "PTR_s__s_004c1a50")) (; ";")) (if_statement "if (iVar2 == 0) {\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }\n  else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n    iVar2 = 1;\n  }" ({ "{") (expression_statement "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" (assignment_expression "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1)" (identifier "cVar4") (= "=") (pointer_expression "*(char *)(*(int *)(param_3 + 4) + -1)" (* "*") (cast_expression "(char *)(*(int *)(param_3 + 4) + -1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_3 + 4) + -1)" (( "(") (binary_expression "*(int *)(param_3 + 4) + -1" (pointer_expression "*(int *)(param_3 + 4)" (* "*") (cast_expression "(int *)(param_3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "-1")) () ")"))))) (; ";")) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" (else "else") (compound_statement "{\n    iVar2 = 1;\n    if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }\nLAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);\n  }" ({ "{") (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (if_statement "if (0 < local_3c) {\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }" (if "if") (parenthesized_expression "(0 < local_3c)" (( "(") (binary_expression "0 < local_3c" (number_literal "0") (< "<") (identifier "local_3c")) () ")")) (compound_statement "{\n      local_38 = PTR_LAB_004c4fd8;\n      iVar5 = 0;\n      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);\n      pcVar3 = (char *)*param_2;\n      local_34 = PTR_UINT_004c12dc + -0x6f1c;\n      cVar4 = *pcVar3;\n      if (cVar4 == 'Z') goto LAB_00316a30;\n      while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }\n      iVar2 = FUN_0031439c(param_1,param_2,&local_48);\n      if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }\n      if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }\n    }" ({ "{") (expression_statement "local_38 = PTR_LAB_004c4fd8;" (assignment_expression "local_38 = PTR_LAB_004c4fd8" (identifier "local_38") (= "=") (identifier "PTR_LAB_004c4fd8")) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);" (assignment_expression "local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8)" (identifier "local_30") (= "=") (cast_expression "(code *)(PTR_LAB_004c4fd8 + 0x27e8)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_LAB_004c4fd8 + 0x27e8)" (( "(") (binary_expression "PTR_LAB_004c4fd8 + 0x27e8" (identifier "PTR_LAB_004c4fd8") (+ "+") (number_literal "0x27e8")) () ")")))) (; ";")) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" (identifier "pcVar3") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "local_34 = PTR_UINT_004c12dc + -0x6f1c;" (assignment_expression "local_34 = PTR_UINT_004c12dc + -0x6f1c" (identifier "local_34") (= "=") (binary_expression "PTR_UINT_004c12dc + -0x6f1c" (identifier "PTR_UINT_004c12dc") (+ "+") (number_literal "-0x6f1c"))) (; ";")) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" (identifier "cVar4") (= "=") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3"))) (; ";")) (if_statement "if (cVar4 == 'Z') goto LAB_00316a30;" (if "if") (parenthesized_expression "(cVar4 == 'Z')" (( "(") (binary_expression "cVar4 == 'Z'" (identifier "cVar4") (== "==") (char_literal "'Z'" (' "'") (character "Z") (' "'"))) () ")")) (goto_statement "goto LAB_00316a30;" (goto "goto") (statement_identifier "LAB_00316a30") (; ";"))) (while_statement "while (cVar4 == 'z') {\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }" (while "while") (parenthesized_expression "(cVar4 == 'z')" (( "(") (binary_expression "cVar4 == 'z'" (identifier "cVar4") (== "==") (char_literal "'z'" (' "'") (character "z") (' "'"))) () ")")) (compound_statement "{\n        *param_2 = pcVar3 + 1;\n        iVar2 = FUN_00316818(param_1,param_2,param_3);\n        if (iVar2 == 0) goto LAB_00316a90;\nLAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }\n      }" ({ "{") (expression_statement "*param_2 = pcVar3 + 1;" (assignment_expression "*param_2 = pcVar3 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "pcVar3 + 1" (identifier "pcVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar2 = FUN_00316818(param_1,param_2,param_3);" (assignment_expression "iVar2 = FUN_00316818(param_1,param_2,param_3)" (identifier "iVar2") (= "=") (call_expression "FUN_00316818(param_1,param_2,param_3)" (identifier "FUN_00316818") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) goto LAB_00316a90;" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00316a90;" (goto "goto") (statement_identifier "LAB_00316a90") (; ";"))) (labeled_statement "LAB_003169ec:\n        while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" (statement_identifier "LAB_003169ec") (: ":") (while_statement "while( true ) {\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n          iVar5 = iVar5 + 1;\n          if (local_3c <= iVar5) goto LAB_0031693c;\n          FUN_00312594(param_3,puVar1 + 0x644c);\n          pcVar3 = (char *)*param_2;\n          cVar4 = *pcVar3;\n          if (cVar4 != 'Z') break;\nLAB_00316a30:\n          *param_2 = pcVar3 + 1;\n          FUN_00312594(param_3,local_34);\n        }" ({ "{") (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (local_3c <= iVar5) goto LAB_0031693c;" (if "if") (parenthesized_expression "(local_3c <= iVar5)" (( "(") (binary_expression "local_3c <= iVar5" (identifier "local_3c") (<= "<=") (identifier "iVar5")) () ")")) (goto_statement "goto LAB_0031693c;" (goto "goto") (statement_identifier "LAB_0031693c") (; ";"))) (expression_statement "FUN_00312594(param_3,puVar1 + 0x644c);" (call_expression "FUN_00312594(param_3,puVar1 + 0x644c)" (identifier "FUN_00312594") (argument_list "(param_3,puVar1 + 0x644c)" (( "(") (identifier "param_3") (, ",") (binary_expression "puVar1 + 0x644c" (identifier "puVar1") (+ "+") (number_literal "0x644c")) () ")"))) (; ";")) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" (identifier "pcVar3") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "cVar4 = *pcVar3;" (assignment_expression "cVar4 = *pcVar3" (identifier "cVar4") (= "=") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3"))) (; ";")) (if_statement "if (cVar4 != 'Z') break;" (if "if") (parenthesized_expression "(cVar4 != 'Z')" (( "(") (binary_expression "cVar4 != 'Z'" (identifier "cVar4") (!= "!=") (char_literal "'Z'" (' "'") (character "Z") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (labeled_statement "LAB_00316a30:\n          *param_2 = pcVar3 + 1;" (statement_identifier "LAB_00316a30") (: ":") (expression_statement "*param_2 = pcVar3 + 1;" (assignment_expression "*param_2 = pcVar3 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "pcVar3 + 1" (identifier "pcVar3") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "FUN_00312594(param_3,local_34);" (call_expression "FUN_00312594(param_3,local_34)" (identifier "FUN_00312594") (argument_list "(param_3,local_34)" (( "(") (identifier "param_3") (, ",") (identifier "local_34") () ")"))) (; ";")) (} "}")))) (} "}"))) (expression_statement "iVar2 = FUN_0031439c(param_1,param_2,&local_48);" (assignment_expression "iVar2 = FUN_0031439c(param_1,param_2,&local_48)" (identifier "iVar2") (= "=") (call_expression "FUN_0031439c(param_1,param_2,&local_48)" (identifier "FUN_0031439c") (argument_list "(param_1,param_2,&local_48)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (pointer_expression "&local_48" (& "&") (identifier "local_48")) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        (*local_30)(param_3,&local_48,local_44);\n        if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }\n        goto LAB_003169ec;\n      }" ({ "{") (expression_statement "(*local_30)(param_3,&local_48,local_44);" (call_expression "(*local_30)(param_3,&local_48,local_44)" (parenthesized_expression "(*local_30)" (( "(") (pointer_expression "*local_30" (* "*") (identifier "local_30")) () ")")) (argument_list "(param_3,&local_48,local_44)" (( "(") (identifier "param_3") (, ",") (pointer_expression "&local_48" (& "&") (identifier "local_48")) (, ",") (identifier "local_44") () ")"))) (; ";")) (if_statement "if (local_48 != 0) {\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }" (if "if") (parenthesized_expression "(local_48 != 0)" (( "(") (binary_expression "local_48 != 0" (identifier "local_48") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          (*(code *)PTR_free_004c5c18)();\n          local_44 = 0;\n          local_40 = 0;\n          local_48 = 0;\n        }" ({ "{") (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" (( "(") (pointer_expression "*(code *)PTR_free_004c5c18" (* "*") (cast_expression "(code *)PTR_free_004c5c18" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_004c5c18"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" (identifier "local_44") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" (identifier "local_40") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" (identifier "local_48") (= "=") (number_literal "0")) (; ";")) (} "}"))) (goto_statement "goto LAB_003169ec;" (goto "goto") (statement_identifier "LAB_003169ec") (; ";")) (} "}"))) (if_statement "if (local_48 == 0) {\nLAB_00316a90:\n        iVar2 = 0;\n      }\n      else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" (if "if") (parenthesized_expression "(local_48 == 0)" (( "(") (binary_expression "local_48 == 0" (identifier "local_48") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00316a90:\n        iVar2 = 0;\n      }" ({ "{") (labeled_statement "LAB_00316a90:\n        iVar2 = 0;" (statement_identifier "LAB_00316a90") (: ":") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";"))) (} "}")) (else_clause "else {\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" (else "else") (compound_statement "{\n        (*(code *)PTR_free_004c5c18)();\n        local_44 = 0;\n        local_40 = 0;\n        local_48 = 0;\n      }" ({ "{") (expression_statement "(*(code *)PTR_free_004c5c18)();" (call_expression "(*(code *)PTR_free_004c5c18)()" (parenthesized_expression "(*(code *)PTR_free_004c5c18)" (( "(") (pointer_expression "*(code *)PTR_free_004c5c18" (* "*") (cast_expression "(code *)PTR_free_004c5c18" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_004c5c18"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" (identifier "local_44") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" (identifier "local_40") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" (identifier "local_48") (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}"))) (labeled_statement "LAB_0031693c:\n    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" (statement_identifier "LAB_0031693c") (: ":") (expression_statement "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);" (assignment_expression "cVar4 = *(char *)(*(int *)(param_3 + 4) + -1)" (identifier "cVar4") (= "=") (pointer_expression "*(char *)(*(int *)(param_3 + 4) + -1)" (* "*") (cast_expression "(char *)(*(int *)(param_3 + 4) + -1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_3 + 4) + -1)" (( "(") (binary_expression "*(int *)(param_3 + 4) + -1" (pointer_expression "*(int *)(param_3 + 4)" (* "*") (cast_expression "(int *)(param_3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "-1")) () ")"))))) (; ";"))) (} "}")))) (if_statement "if (cVar4 == '>') {\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" (if "if") (parenthesized_expression "(cVar4 == '>')" (( "(") (binary_expression "cVar4 == '>'" (identifier "cVar4") (== "==") (char_literal "'>'" (' "'") (character ">") (' "'"))) () ")")) (compound_statement "{\n    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);\n  }" ({ "{") (expression_statement "FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);" (call_expression "FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c)" (identifier "FUN_00312594") (argument_list "(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c)" (( "(") (identifier "param_3") (, ",") (binary_expression "PTR_s_in_a_linker_script_004c191c + -0x8c" (identifier "PTR_s_in_a_linker_script_004c191c") (+ "+") (number_literal "-0x8c")) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);" (call_expression "FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14)" (identifier "FUN_00312594") (argument_list "(param_3,PTR_UINT_004c12dc + -0x6f14)" (( "(") (identifier "param_3") (, ",") (binary_expression "PTR_UINT_004c12dc + -0x6f14" (identifier "PTR_UINT_004c12dc") (+ "+") (number_literal "-0x6f14")) () ")"))) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

int function_1(type_1 *work,char **mangled,type_2 *tname)

{
  type_3 *var_11;
  int var_4;
  char *var_8;
  char var_7;
  int var_10;
  type_2 temp;
  int var_5;
  type_3 *local_38;
  char *local_34;
  type_4 *local_30;
  
  var_1(tname,var_2 + -0x6f28);
  var_4 = var_3(mangled,&var_5);
  var_11 = PTR_s__s_004c1a50;
  if (var_4 == 0) {
    var_7 = tname->p[-1];
    var_4 = 1;
  }
  else {
    var_4 = 1;
    if (0 < var_5) {
      local_38 = var_6;
      var_10 = 0;
      local_30 = (type_4 *)(var_6 + 0x27e8);
      var_8 = *mangled;
      local_34 = var_2 + -0x6f1c;
      var_7 = *var_8;
      if (var_7 == 'Z') goto LAB_00316a30;
      do {
        if (var_7 == 'z') {
          *mangled = var_8 + 1;
          var_4 = function_1(work,mangled,tname);
          if (var_4 == 0) goto LAB_00316a90;
        }
        else {
          var_4 = var_9(work,mangled,&temp);
          if (var_4 == 0) {
            if (temp.b == (char *)0x0) {
LAB_00316a90:
              var_4 = 0;
            }
            else {
              (*(type_4 *)PTR_free_004c5c18)();
              temp.p = (char *)0x0;
              temp.e = (char *)0x0;
              temp.b = (char *)0x0;
            }
            break;
          }
          (*local_30)(tname,&temp,temp.p);
          if (temp.b != (char *)0x0) {
            (*(type_4 *)PTR_free_004c5c18)();
            temp.p = (char *)0x0;
            temp.e = (char *)0x0;
            temp.b = (char *)0x0;
          }
        }
        while( true ) {
          var_10 = var_10 + 1;
          if (var_5 <= var_10) goto LAB_0031693c;
          var_1(tname,var_11 + 0x644c);
          var_8 = *mangled;
          var_7 = *var_8;
          if (var_7 != 'Z') break;
LAB_00316a30:
          *mangled = var_8 + 1;
          var_1(tname,local_34);
        }
      } while( true );
    }
LAB_0031693c:
    var_7 = tname->p[-1];
  }
  if (var_7 == '>') {
    var_1(tname,var_12 + -0x8c);
  }
  var_1(tname,var_2 + -0x6f14);
  return var_4;
}


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

int MASKED(undefined4 param_1,undefined4 *param_2,int param_3)

{
  undefined *puVar1;
  int iVar2;
  char *pcVar3;
  char cVar4;
  int iVar5;
  int local_48;
  undefined4 local_44;
  undefined4 local_40;
  int local_3c;
  undefined *local_38;
  undefined *local_34;
  code *local_30;
  
  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f28);
  iVar2 = FUN_003118a0(param_2,&local_3c);
  puVar1 = PTR_s__s_004c1a50;
  if (iVar2 == 0) {
    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);
    iVar2 = 1;
  }
  else {
    iVar2 = 1;
    if (0 < local_3c) {
      local_38 = PTR_LAB_004c4fd8;
      iVar5 = 0;
      local_30 = (code *)(PTR_LAB_004c4fd8 + 0x27e8);
      pcVar3 = (char *)*param_2;
      local_34 = PTR_UINT_004c12dc + -0x6f1c;
      cVar4 = *pcVar3;
      if (cVar4 == 'Z') goto LAB_00316a30;
      while (cVar4 == 'z') {
        *param_2 = pcVar3 + 1;
        iVar2 = MASKED(param_1,param_2,param_3);
        if (iVar2 == 0) goto LAB_00316a90;
LAB_003169ec:
        while( true ) {
          iVar5 = iVar5 + 1;
          if (local_3c <= iVar5) goto LAB_0031693c;
          FUN_00312594(param_3,puVar1 + 0x644c);
          pcVar3 = (char *)*param_2;
          cVar4 = *pcVar3;
          if (cVar4 != 'Z') break;
LAB_00316a30:
          *param_2 = pcVar3 + 1;
          FUN_00312594(param_3,local_34);
        }
      }
      iVar2 = FUN_0031439c(param_1,param_2,&local_48);
      if (iVar2 != 0) {
        (*local_30)(param_3,&local_48,local_44);
        if (local_48 != 0) {
          (*(code *)PTR_free_004c5c18)();
          local_44 = 0;
          local_40 = 0;
          local_48 = 0;
        }
        goto LAB_003169ec;
      }
      if (local_48 == 0) {
LAB_00316a90:
        iVar2 = 0;
      }
      else {
        (*(code *)PTR_free_004c5c18)();
        local_44 = 0;
        local_40 = 0;
        local_48 = 0;
      }
    }
LAB_0031693c:
    cVar4 = *(char *)(*(int *)(param_3 + 4) + -1);
  }
  if (cVar4 == '>') {
    FUN_00312594(param_3,PTR_s_in_a_linker_script_004c191c + -0x8c);
  }
  FUN_00312594(param_3,PTR_UINT_004c12dc + -0x6f14);
  return iVar2;
}

