
char * sqlite3IndexAffinityStr(sqlite3 *db,Index *pIdx)

{
  undefined3 extraout_var;
  char *pcVar1;
  int iVar2;
  char cVar3;
  uint uVar4;
  int iVar5;
  Table *pTVar6;
  undefined4 in_stack_ffffffd4;
  
  if (pIdx->zColAff != (char *)0x0) {
    return pIdx->zColAff;
  }
  pTVar6 = pIdx->pTable;
  pcVar1 = (char *)sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4));
  pIdx->zColAff = pcVar1;
  if (pcVar1 == (char *)0x0) {
    uVar4._0_1_ = db->temp_store;
    uVar4._1_1_ = db->mallocFailed;
    uVar4._2_1_ = db->bBenignMalloc;
    uVar4._3_1_ = db->dfltLockMode;
    pcVar1 = (char *)0x0;
    if ((uVar4 & 0xffff00) == 0) {
      sqlite3OomFault(db);
    }
  }
  else {
    iVar2 = 0;
    if (pIdx->nColumn != 0) {
      do {
        while( true ) {
          iVar5 = iVar2;
          iVar2 = (int)pIdx->aiColumn[iVar5];
          if (iVar2 < 0) break;
          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;
LAB_00051cf8:
          iVar2 = iVar5 + 1;
          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;
        }
        if (iVar2 != -1) {
          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);
          iVar2 = CONCAT31(extraout_var,cVar3);
          if (iVar2 == 0) {
            iVar2 = 0x41;
          }
          pIdx->zColAff[iVar5] = (char)iVar2;
          goto LAB_00051cf8;
        }
        pIdx->zColAff[iVar5] = 'D';
        iVar2 = iVar5 + 1;
      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);
FUN_00051d4c:
      pcVar1 = pIdx->zColAff + iVar5 + 1;
    }
    *pcVar1 = '\0';
    pcVar1 = pIdx->zColAff;
  }
  return pcVar1;
}



int FUN_00051c4c(int param_1,int param_2)

{
  undefined1 *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)(param_2 + 0x10) != 0) {
    return *(int *)(param_2 + 0x10);
  }
  iVar4 = *(int *)(param_2 + 0xc);
  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);
  *(undefined1 **)(param_2 + 0x10) = puVar1;
  if (puVar1 == (undefined1 *)0x0) {
    iVar4 = 0;
    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {
      FUN_0005082c(param_1);
    }
  }
  else {
    iVar2 = 0;
    if (*(short *)(param_2 + 0x34) != 0) {
      do {
        while( true ) {
          iVar3 = iVar2;
          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);
          if (iVar2 < 0) break;
          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =
               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);
LAB_00051cf8:
          iVar2 = iVar3 + 1;
          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;
        }
        if (iVar2 != -1) {
          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));
          if (iVar2 == 0) {
            iVar2 = 0x41;
          }
          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;
          goto LAB_00051cf8;
        }
        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;
        iVar2 = iVar3 + 1;
      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));
LAB_00051d4c:
      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);
    }
    *puVar1 = 0;
    iVar4 = *(int *)(param_2 + 0x10);
  }
  return iVar4;
}


lui gp,0x14
addiu gp,gp,0x6cd4
addu gp,gp,t9
lw v0,0x10(a1)
beq v0,zero,0x00051c6c
_nop
jr ra
_nop
(translation_unit "int FUN_00051c4c(int param_1,int param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_00051c4c(int param_1,int param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00051c4c(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }" if (parenthesized_expression "(*(int *)(param_2 + 0x10) != 0)" ( (binary_expression "*(int *)(param_2 + 0x10) != 0" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    return *(int *)(param_2 + 0x10);\n  }" { (return_statement "return *(int *)(param_2 + 0x10);" return (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) ;) })) (expression_statement "iVar4 = *(int *)(param_2 + 0xc);" (assignment_expression "iVar4 = *(int *)(param_2 + 0xc)" identifier = (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);" (assignment_expression "puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" identifier = (cast_expression "(undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" identifier (argument_list "(0,*(ushort *)(param_2 + 0x34) + 1)" ( number_literal , (binary_expression "*(ushort *)(param_2 + 0x34) + 1" (pointer_expression "*(ushort *)(param_2 + 0x34)" * (cast_expression "(ushort *)(param_2 + 0x34)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "*(undefined1 **)(param_2 + 0x10) = puVar1;" (assignment_expression "*(undefined1 **)(param_2 + 0x10) = puVar1" (pointer_expression "*(undefined1 **)(param_2 + 0x10)" * (cast_expression "(undefined1 **)(param_2 + 0x10)" ( (type_descriptor "undefined1 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = identifier) ;) (if_statement "if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" if (parenthesized_expression "(puVar1 == (undefined1 *)0x0)" ( (binary_expression "puVar1 == (undefined1 *)0x0" identifier == (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x50) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x50) & 0xffff00)" ( (binary_expression "*(uint *)(param_1 + 0x50) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x50)" * (cast_expression "(uint *)(param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_0005082c(param_1);\n    }" { (expression_statement "FUN_0005082c(param_1);" (call_expression "FUN_0005082c(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) }) (else_clause "else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" else (compound_statement "{\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }" if (parenthesized_expression "(*(short *)(param_2 + 0x34) != 0)" ( (binary_expression "*(short *)(param_2 + 0x34) != 0" (pointer_expression "*(short *)(param_2 + 0x34)" * (cast_expression "(short *)(param_2 + 0x34)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }" { (do_statement "do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));" do (compound_statement "{\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      }" { (while_statement "while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (expression_statement "iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);" (assignment_expression "iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" identifier = (cast_expression "(int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" * (cast_expression "(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 4) + iVar3 * 2)" ( (binary_expression "*(int *)(param_2 + 4) + iVar3 * 2" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + (binary_expression "iVar3 * 2" identifier * number_literal)) )))))) ;) (if_statement "if (iVar2 < 0) break;" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);" (assignment_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" (pointer_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" * (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) )))) = (pointer_expression "*(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" * (cast_expression "(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" ( (binary_expression "*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd" (binary_expression "*(int *)(iVar4 + 4) + iVar2 * 0x10" (pointer_expression "*(int *)(iVar4 + 4)" * (cast_expression "(int *)(iVar4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) + (binary_expression "iVar2 * 0x10" identifier * number_literal)) + number_literal) ))))) ;) (labeled_statement "LAB_00051cf8:\n          iVar2 = iVar3 + 1;" statement_identifier : (expression_statement "iVar2 = iVar3 + 1;" (assignment_expression "iVar2 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;)) (if_statement "if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;" if (parenthesized_expression "((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1)" ( (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1" (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_2 + 0x34)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) <= (binary_expression "iVar3 + 1" identifier + number_literal)) )) (goto_statement "goto LAB_00051d4c;" goto statement_identifier ;)) })) (if_statement "if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }" { (expression_statement "iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));" (assignment_expression "iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" identifier = (call_expression "FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" identifier (argument_list "(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" ( (pointer_expression "*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" * (cast_expression "(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" ( (binary_expression "*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4" (binary_expression "*(int *)(param_2 + 0x28) + iVar3 * 0x14" (pointer_expression "*(int *)(param_2 + 0x28)" * (cast_expression "(int *)(param_2 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x28)" ( (binary_expression "param_2 + 0x28" identifier + number_literal) )))) + (binary_expression "iVar3 * 0x14" identifier * number_literal)) + number_literal) )))) )))) ;) (if_statement "if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar2 = 0x41;\n          }" { (expression_statement "iVar2 = 0x41;" (assignment_expression "iVar2 = 0x41" identifier = number_literal) ;) })) (expression_statement "*(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;" (assignment_expression "*(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2" (pointer_expression "*(char *)(*(int *)(param_2 + 0x10) + iVar3)" * (cast_expression "(char *)(*(int *)(param_2 + 0x10) + iVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) )))) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (goto_statement "goto LAB_00051cf8;" goto statement_identifier ;) })) (expression_statement "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;" (assignment_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44" (pointer_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" * (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) )))) = number_literal) ;) (expression_statement "iVar2 = iVar3 + 1;" (assignment_expression "iVar2 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34))" ( (binary_expression "iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34)" (binary_expression "iVar3 + 1" identifier + number_literal) < (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_2 + 0x34)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) ))))) )) ;) (labeled_statement "LAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);" statement_identifier : (expression_statement "puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);" (assignment_expression "puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1)" identifier = (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3 + 1)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3 + 1" (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) + number_literal) )))) ;)) })) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "iVar4 = *(int *)(param_2 + 0x10);" (assignment_expression "iVar4 = *(int *)(param_2 + 0x10)" identifier = (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "char * sqlite3IndexAffinityStr(sqlite3 *db,Index *pIdx)\n\n{\n  undefined3 extraout_var;\n  char *pcVar1;\n  int iVar2;\n  char cVar3;\n  uint uVar4;\n  int iVar5;\n  Table *pTVar6;\n  undefined4 in_stack_ffffffd4;\n  \n  if (pIdx->zColAff != (char *)0x0) {\n    return pIdx->zColAff;\n  }\n  pTVar6 = pIdx->pTable;\n  pcVar1 = (char *)sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4));\n  pIdx->zColAff = pcVar1;\n  if (pcVar1 == (char *)0x0) {\n    uVar4._0_1_ = db->temp_store;\n    uVar4._1_1_ = db->mallocFailed;\n    uVar4._2_1_ = db->bBenignMalloc;\n    uVar4._3_1_ = db->dfltLockMode;\n    pcVar1 = (char *)0x0;\n    if ((uVar4 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (pIdx->nColumn != 0) {\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = pIdx->zColAff;\n  }\n  return pcVar1;\n}\n\n" (function_definition "char * sqlite3IndexAffinityStr(sqlite3 *db,Index *pIdx)\n\n{\n  undefined3 extraout_var;\n  char *pcVar1;\n  int iVar2;\n  char cVar3;\n  uint uVar4;\n  int iVar5;\n  Table *pTVar6;\n  undefined4 in_stack_ffffffd4;\n  \n  if (pIdx->zColAff != (char *)0x0) {\n    return pIdx->zColAff;\n  }\n  pTVar6 = pIdx->pTable;\n  pcVar1 = (char *)sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4));\n  pIdx->zColAff = pcVar1;\n  if (pcVar1 == (char *)0x0) {\n    uVar4._0_1_ = db->temp_store;\n    uVar4._1_1_ = db->mallocFailed;\n    uVar4._2_1_ = db->bBenignMalloc;\n    uVar4._3_1_ = db->dfltLockMode;\n    pcVar1 = (char *)0x0;\n    if ((uVar4 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (pIdx->nColumn != 0) {\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = pIdx->zColAff;\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* sqlite3IndexAffinityStr(sqlite3 *db,Index *pIdx)" * (function_declarator "sqlite3IndexAffinityStr(sqlite3 *db,Index *pIdx)" identifier (parameter_list "(sqlite3 *db,Index *pIdx)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "Index *pIdx" type_identifier (pointer_declarator "*pIdx" * identifier)) )))) (compound_statement "{\n  undefined3 extraout_var;\n  char *pcVar1;\n  int iVar2;\n  char cVar3;\n  uint uVar4;\n  int iVar5;\n  Table *pTVar6;\n  undefined4 in_stack_ffffffd4;\n  \n  if (pIdx->zColAff != (char *)0x0) {\n    return pIdx->zColAff;\n  }\n  pTVar6 = pIdx->pTable;\n  pcVar1 = (char *)sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4));\n  pIdx->zColAff = pcVar1;\n  if (pcVar1 == (char *)0x0) {\n    uVar4._0_1_ = db->temp_store;\n    uVar4._1_1_ = db->mallocFailed;\n    uVar4._2_1_ = db->bBenignMalloc;\n    uVar4._3_1_ = db->dfltLockMode;\n    pcVar1 = (char *)0x0;\n    if ((uVar4 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (pIdx->nColumn != 0) {\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = pIdx->zColAff;\n  }\n  return pcVar1;\n}" { (declaration "undefined3 extraout_var;" type_identifier identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "Table *pTVar6;" type_identifier (pointer_declarator "*pTVar6" * identifier) ;) (declaration "undefined4 in_stack_ffffffd4;" type_identifier identifier ;) (if_statement "if (pIdx->zColAff != (char *)0x0) {\n    return pIdx->zColAff;\n  }" if (parenthesized_expression "(pIdx->zColAff != (char *)0x0)" ( (binary_expression "pIdx->zColAff != (char *)0x0" (field_expression "pIdx->zColAff" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return pIdx->zColAff;\n  }" { (return_statement "return pIdx->zColAff;" return (field_expression "pIdx->zColAff" identifier -> field_identifier) ;) })) (expression_statement "pTVar6 = pIdx->pTable;" (assignment_expression "pTVar6 = pIdx->pTable" identifier = (field_expression "pIdx->pTable" identifier -> field_identifier)) ;) (expression_statement "pcVar1 = (char *)sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4));" (assignment_expression "pcVar1 = (char *)sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4))" identifier = (cast_expression "(char *)sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3Malloc(CONCAT44(&_gp,in_stack_ffffffd4))" identifier (argument_list "(CONCAT44(&_gp,in_stack_ffffffd4))" ( (call_expression "CONCAT44(&_gp,in_stack_ffffffd4)" identifier (argument_list "(&_gp,in_stack_ffffffd4)" ( (pointer_expression "&_gp" & identifier) , identifier ))) ))))) ;) (expression_statement "pIdx->zColAff = pcVar1;" (assignment_expression "pIdx->zColAff = pcVar1" (field_expression "pIdx->zColAff" identifier -> field_identifier) = identifier) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n    uVar4._0_1_ = db->temp_store;\n    uVar4._1_1_ = db->mallocFailed;\n    uVar4._2_1_ = db->bBenignMalloc;\n    uVar4._3_1_ = db->dfltLockMode;\n    pcVar1 = (char *)0x0;\n    if ((uVar4 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (pIdx->nColumn != 0) {\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = pIdx->zColAff;\n  }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar4._0_1_ = db->temp_store;\n    uVar4._1_1_ = db->mallocFailed;\n    uVar4._2_1_ = db->bBenignMalloc;\n    uVar4._3_1_ = db->dfltLockMode;\n    pcVar1 = (char *)0x0;\n    if ((uVar4 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }\n  }" { (expression_statement "uVar4._0_1_ = db->temp_store;" (assignment_expression "uVar4._0_1_ = db->temp_store" (field_expression "uVar4._0_1_" identifier . field_identifier) = (field_expression "db->temp_store" identifier -> field_identifier)) ;) (expression_statement "uVar4._1_1_ = db->mallocFailed;" (assignment_expression "uVar4._1_1_ = db->mallocFailed" (field_expression "uVar4._1_1_" identifier . field_identifier) = (field_expression "db->mallocFailed" identifier -> field_identifier)) ;) (expression_statement "uVar4._2_1_ = db->bBenignMalloc;" (assignment_expression "uVar4._2_1_ = db->bBenignMalloc" (field_expression "uVar4._2_1_" identifier . field_identifier) = (field_expression "db->bBenignMalloc" identifier -> field_identifier)) ;) (expression_statement "uVar4._3_1_ = db->dfltLockMode;" (assignment_expression "uVar4._3_1_ = db->dfltLockMode" (field_expression "uVar4._3_1_" identifier . field_identifier) = (field_expression "db->dfltLockMode" identifier -> field_identifier)) ;) (expression_statement "pcVar1 = (char *)0x0;" (assignment_expression "pcVar1 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if ((uVar4 & 0xffff00) == 0) {\n      sqlite3OomFault(db);\n    }" if (parenthesized_expression "((uVar4 & 0xffff00) == 0)" ( (binary_expression "(uVar4 & 0xffff00) == 0" (parenthesized_expression "(uVar4 & 0xffff00)" ( (binary_expression "uVar4 & 0xffff00" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      sqlite3OomFault(db);\n    }" { (expression_statement "sqlite3OomFault(db);" (call_expression "sqlite3OomFault(db)" identifier (argument_list "(db)" ( identifier ))) ;) })) }) (else_clause "else {\n    iVar2 = 0;\n    if (pIdx->nColumn != 0) {\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = pIdx->zColAff;\n  }" else (compound_statement "{\n    iVar2 = 0;\n    if (pIdx->nColumn != 0) {\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = pIdx->zColAff;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if (pIdx->nColumn != 0) {\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }" if (parenthesized_expression "(pIdx->nColumn != 0)" ( (binary_expression "pIdx->nColumn != 0" (field_expression "pIdx->nColumn" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n      do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);\nFUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;\n    }" { (do_statement "do {\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      } while (iVar5 + 1 < (int)(uint)pIdx->nColumn);" do (compound_statement "{\n        while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }\n        if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        pIdx->zColAff[iVar5] = 'D';\n        iVar2 = iVar5 + 1;\n      }" { (while_statement "while( true ) {\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar5 = iVar2;\n          iVar2 = (int)pIdx->aiColumn[iVar5];\n          if (iVar2 < 0) break;\n          pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;\nLAB_00051cf8:\n          iVar2 = iVar5 + 1;\n          if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;\n        }" { (expression_statement "iVar5 = iVar2;" (assignment_expression "iVar5 = iVar2" identifier = identifier) ;) (expression_statement "iVar2 = (int)pIdx->aiColumn[iVar5];" (assignment_expression "iVar2 = (int)pIdx->aiColumn[iVar5]" identifier = (cast_expression "(int)pIdx->aiColumn[iVar5]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "pIdx->aiColumn[iVar5]" (field_expression "pIdx->aiColumn" identifier -> field_identifier) [ identifier ]))) ;) (if_statement "if (iVar2 < 0) break;" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity;" (assignment_expression "pIdx->zColAff[iVar5] = pTVar6->aCol[iVar2].affinity" (subscript_expression "pIdx->zColAff[iVar5]" (field_expression "pIdx->zColAff" identifier -> field_identifier) [ identifier ]) = (field_expression "pTVar6->aCol[iVar2].affinity" (subscript_expression "pTVar6->aCol[iVar2]" (field_expression "pTVar6->aCol" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) (labeled_statement "LAB_00051cf8:\n          iVar2 = iVar5 + 1;" statement_identifier : (expression_statement "iVar2 = iVar5 + 1;" (assignment_expression "iVar2 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;)) (if_statement "if ((int)(uint)pIdx->nColumn <= iVar5 + 1) goto FUN_00051d4c;" if (parenthesized_expression "((int)(uint)pIdx->nColumn <= iVar5 + 1)" ( (binary_expression "(int)(uint)pIdx->nColumn <= iVar5 + 1" (cast_expression "(int)(uint)pIdx->nColumn" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)pIdx->nColumn" ( (type_descriptor "uint" type_identifier) ) (field_expression "pIdx->nColumn" identifier -> field_identifier))) <= (binary_expression "iVar5 + 1" identifier + number_literal)) )) (goto_statement "goto FUN_00051d4c;" goto statement_identifier ;)) })) (if_statement "if (iVar2 != -1) {\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n          cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);\n          iVar2 = CONCAT31(extraout_var,cVar3);\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          pIdx->zColAff[iVar5] = (char)iVar2;\n          goto LAB_00051cf8;\n        }" { (expression_statement "cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr);" (assignment_expression "cVar3 = sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr)" identifier = (call_expression "sqlite3ExprAffinity(pIdx->aColExpr->a[iVar5].pExpr)" identifier (argument_list "(pIdx->aColExpr->a[iVar5].pExpr)" ( (field_expression "pIdx->aColExpr->a[iVar5].pExpr" (subscript_expression "pIdx->aColExpr->a[iVar5]" (field_expression "pIdx->aColExpr->a" (field_expression "pIdx->aColExpr" identifier -> field_identifier) -> field_identifier) [ identifier ]) . field_identifier) )))) ;) (expression_statement "iVar2 = CONCAT31(extraout_var,cVar3);" (assignment_expression "iVar2 = CONCAT31(extraout_var,cVar3)" identifier = (call_expression "CONCAT31(extraout_var,cVar3)" identifier (argument_list "(extraout_var,cVar3)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar2 = 0x41;\n          }" { (expression_statement "iVar2 = 0x41;" (assignment_expression "iVar2 = 0x41" identifier = number_literal) ;) })) (expression_statement "pIdx->zColAff[iVar5] = (char)iVar2;" (assignment_expression "pIdx->zColAff[iVar5] = (char)iVar2" (subscript_expression "pIdx->zColAff[iVar5]" (field_expression "pIdx->zColAff" identifier -> field_identifier) [ identifier ]) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (goto_statement "goto LAB_00051cf8;" goto statement_identifier ;) })) (expression_statement "pIdx->zColAff[iVar5] = 'D';" (assignment_expression "pIdx->zColAff[iVar5] = 'D'" (subscript_expression "pIdx->zColAff[iVar5]" (field_expression "pIdx->zColAff" identifier -> field_identifier) [ identifier ]) = (char_literal "'D'" ' character ')) ;) (expression_statement "iVar2 = iVar5 + 1;" (assignment_expression "iVar2 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 + 1 < (int)(uint)pIdx->nColumn)" ( (binary_expression "iVar5 + 1 < (int)(uint)pIdx->nColumn" (binary_expression "iVar5 + 1" identifier + number_literal) < (cast_expression "(int)(uint)pIdx->nColumn" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)pIdx->nColumn" ( (type_descriptor "uint" type_identifier) ) (field_expression "pIdx->nColumn" identifier -> field_identifier)))) )) ;) (labeled_statement "FUN_00051d4c:\n      pcVar1 = pIdx->zColAff + iVar5 + 1;" statement_identifier : (expression_statement "pcVar1 = pIdx->zColAff + iVar5 + 1;" (assignment_expression "pcVar1 = pIdx->zColAff + iVar5 + 1" identifier = (binary_expression "pIdx->zColAff + iVar5 + 1" (binary_expression "pIdx->zColAff + iVar5" (field_expression "pIdx->zColAff" identifier -> field_identifier) + identifier) + number_literal)) ;)) })) (expression_statement "*pcVar1 = '\0';" (assignment_expression "*pcVar1 = '\0'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar1 = pIdx->zColAff;" (assignment_expression "pcVar1 = pIdx->zColAff" identifier = (field_expression "pIdx->zColAff" identifier -> field_identifier)) ;) }))) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "int FUN_00051c4c(int param_1,int param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_00051c4c(int param_1,int param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00051c4c(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }" if (parenthesized_expression "(*(int *)(param_2 + 0x10) != 0)" ( (binary_expression "*(int *)(param_2 + 0x10) != 0" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    return *(int *)(param_2 + 0x10);\n  }" { (return_statement "return *(int *)(param_2 + 0x10);" return (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) ;) })) (expression_statement "iVar4 = *(int *)(param_2 + 0xc);" (assignment_expression "iVar4 = *(int *)(param_2 + 0xc)" identifier = (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);" (assignment_expression "puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" identifier = (cast_expression "(undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" identifier (argument_list "(0,*(ushort *)(param_2 + 0x34) + 1)" ( number_literal , (binary_expression "*(ushort *)(param_2 + 0x34) + 1" (pointer_expression "*(ushort *)(param_2 + 0x34)" * (cast_expression "(ushort *)(param_2 + 0x34)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "*(undefined1 **)(param_2 + 0x10) = puVar1;" (assignment_expression "*(undefined1 **)(param_2 + 0x10) = puVar1" (pointer_expression "*(undefined1 **)(param_2 + 0x10)" * (cast_expression "(undefined1 **)(param_2 + 0x10)" ( (type_descriptor "undefined1 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = identifier) ;) (if_statement "if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" if (parenthesized_expression "(puVar1 == (undefined1 *)0x0)" ( (binary_expression "puVar1 == (undefined1 *)0x0" identifier == (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x50) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x50) & 0xffff00)" ( (binary_expression "*(uint *)(param_1 + 0x50) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x50)" * (cast_expression "(uint *)(param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_0005082c(param_1);\n    }" { (expression_statement "FUN_0005082c(param_1);" (call_expression "FUN_0005082c(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) }) (else_clause "else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" else (compound_statement "{\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }" if (parenthesized_expression "(*(short *)(param_2 + 0x34) != 0)" ( (binary_expression "*(short *)(param_2 + 0x34) != 0" (pointer_expression "*(short *)(param_2 + 0x34)" * (cast_expression "(short *)(param_2 + 0x34)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }" { (do_statement "do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));" do (compound_statement "{\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      }" { (while_statement "while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (expression_statement "iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);" (assignment_expression "iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" identifier = (cast_expression "(int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" * (cast_expression "(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 4) + iVar3 * 2)" ( (binary_expression "*(int *)(param_2 + 4) + iVar3 * 2" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + (binary_expression "iVar3 * 2" identifier * number_literal)) )))))) ;) (if_statement "if (iVar2 < 0) break;" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);" (assignment_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" (pointer_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" * (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) )))) = (pointer_expression "*(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" * (cast_expression "(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" ( (binary_expression "*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd" (binary_expression "*(int *)(iVar4 + 4) + iVar2 * 0x10" (pointer_expression "*(int *)(iVar4 + 4)" * (cast_expression "(int *)(iVar4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) + (binary_expression "iVar2 * 0x10" identifier * number_literal)) + number_literal) ))))) ;) (labeled_statement "LAB_00051cf8:\n          iVar2 = iVar3 + 1;" statement_identifier : (expression_statement "iVar2 = iVar3 + 1;" (assignment_expression "iVar2 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;)) (if_statement "if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;" if (parenthesized_expression "((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1)" ( (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1" (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_2 + 0x34)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) <= (binary_expression "iVar3 + 1" identifier + number_literal)) )) (goto_statement "goto LAB_00051d4c;" goto statement_identifier ;)) })) (if_statement "if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }" { (expression_statement "iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));" (assignment_expression "iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" identifier = (call_expression "FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" identifier (argument_list "(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" ( (pointer_expression "*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" * (cast_expression "(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" ( (binary_expression "*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4" (binary_expression "*(int *)(param_2 + 0x28) + iVar3 * 0x14" (pointer_expression "*(int *)(param_2 + 0x28)" * (cast_expression "(int *)(param_2 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x28)" ( (binary_expression "param_2 + 0x28" identifier + number_literal) )))) + (binary_expression "iVar3 * 0x14" identifier * number_literal)) + number_literal) )))) )))) ;) (if_statement "if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar2 = 0x41;\n          }" { (expression_statement "iVar2 = 0x41;" (assignment_expression "iVar2 = 0x41" identifier = number_literal) ;) })) (expression_statement "*(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;" (assignment_expression "*(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2" (pointer_expression "*(char *)(*(int *)(param_2 + 0x10) + iVar3)" * (cast_expression "(char *)(*(int *)(param_2 + 0x10) + iVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) )))) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (goto_statement "goto LAB_00051cf8;" goto statement_identifier ;) })) (expression_statement "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;" (assignment_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44" (pointer_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" * (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) )))) = number_literal) ;) (expression_statement "iVar2 = iVar3 + 1;" (assignment_expression "iVar2 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34))" ( (binary_expression "iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34)" (binary_expression "iVar3 + 1" identifier + number_literal) < (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(param_2 + 0x34)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) ))))) )) ;) (labeled_statement "LAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);" statement_identifier : (expression_statement "puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);" (assignment_expression "puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1)" identifier = (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3 + 1)" ( (binary_expression "*(int *)(param_2 + 0x10) + iVar3 + 1" (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + identifier) + number_literal) )))) ;)) })) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "iVar4 = *(int *)(param_2 + 0x10);" (assignment_expression "iVar4 = *(int *)(param_2 + 0x10)" identifier = (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (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 *)) ) (call_expression IDENT (argument_list ( LIT , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (break_statement break ;)) (expression_statement (assignment_expression (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) )))) + IDENT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) + LIT) ))))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= (binary_expression IDENT + LIT)) )) (goto_statement goto statement_identifier ;)) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (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) )))) + IDENT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (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) )))) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) + LIT) )))) ;)) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_00051c4c(int param_1,int param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_00051c4c(int param_1,int param_2)" (identifier "FUN_00051c4c") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }\n  iVar4 = *(int *)(param_2 + 0xc);\n  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);\n  *(undefined1 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }\n  return iVar4;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (if_statement "if (*(int *)(param_2 + 0x10) != 0) {\n    return *(int *)(param_2 + 0x10);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 0x10) != 0)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) != 0" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return *(int *)(param_2 + 0x10);\n  }" ({ "{") (return_statement "return *(int *)(param_2 + 0x10);" (return "return") (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (; ";")) (} "}"))) (expression_statement "iVar4 = *(int *)(param_2 + 0xc);" (assignment_expression "iVar4 = *(int *)(param_2 + 0xc)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_2 + 0xc)" (* "*") (cast_expression "(int *)(param_2 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xc)" (( "(") (binary_expression "param_2 + 0xc" (identifier "param_2") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);" (assignment_expression "puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1)" (identifier "FUN_0004d4b8") (argument_list "(0,*(ushort *)(param_2 + 0x34) + 1)" (( "(") (number_literal "0") (, ",") (binary_expression "*(ushort *)(param_2 + 0x34) + 1" (pointer_expression "*(ushort *)(param_2 + 0x34)" (* "*") (cast_expression "(ushort *)(param_2 + 0x34)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x34)" (( "(") (binary_expression "param_2 + 0x34" (identifier "param_2") (+ "+") (number_literal "0x34")) () ")")))) (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "*(undefined1 **)(param_2 + 0x10) = puVar1;" (assignment_expression "*(undefined1 **)(param_2 + 0x10) = puVar1" (pointer_expression "*(undefined1 **)(param_2 + 0x10)" (* "*") (cast_expression "(undefined1 **)(param_2 + 0x10)" (( "(") (type_descriptor "undefined1 **" (type_identifier "undefined1") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "puVar1")) (; ";")) (if_statement "if (puVar1 == (undefined1 *)0x0) {\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }\n  else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" (if "if") (parenthesized_expression "(puVar1 == (undefined1 *)0x0)" (( "(") (binary_expression "puVar1 == (undefined1 *)0x0" (identifier "puVar1") (== "==") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar4 = 0;\n    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }\n  }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {\n      FUN_0005082c(param_1);\n    }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0x50) & 0xffff00) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x50) & 0xffff00) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x50) & 0xffff00)" (( "(") (binary_expression "*(uint *)(param_1 + 0x50) & 0xffff00" (pointer_expression "*(uint *)(param_1 + 0x50)" (* "*") (cast_expression "(uint *)(param_1 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0xffff00")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0005082c(param_1);\n    }" ({ "{") (expression_statement "FUN_0005082c(param_1);" (call_expression "FUN_0005082c(param_1)" (identifier "FUN_0005082c") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" (else "else") (compound_statement "{\n    iVar2 = 0;\n    if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }\n    *puVar1 = 0;\n    iVar4 = *(int *)(param_2 + 0x10);\n  }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(short *)(param_2 + 0x34) != 0) {\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }" (if "if") (parenthesized_expression "(*(short *)(param_2 + 0x34) != 0)" (( "(") (binary_expression "*(short *)(param_2 + 0x34) != 0" (pointer_expression "*(short *)(param_2 + 0x34)" (* "*") (cast_expression "(short *)(param_2 + 0x34)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x34)" (( "(") (binary_expression "param_2 + 0x34" (identifier "param_2") (+ "+") (number_literal "0x34")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));\nLAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);\n    }" ({ "{") (do_statement "do {\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));" (do "do") (compound_statement "{\n        while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }\n        if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }\n        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;\n        iVar2 = iVar3 + 1;\n      }" ({ "{") (while_statement "while( true ) {\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n          iVar3 = iVar2;\n          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);\n          if (iVar2 < 0) break;\n          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);\nLAB_00051cf8:\n          iVar2 = iVar3 + 1;\n          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;\n        }" ({ "{") (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (expression_statement "iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);" (assignment_expression "iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" (identifier "iVar2") (= "=") (cast_expression "(int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" (* "*") (cast_expression "(short *)(*(int *)(param_2 + 4) + iVar3 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 4) + iVar3 * 2)" (( "(") (binary_expression "*(int *)(param_2 + 4) + iVar3 * 2" (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (+ "+") (binary_expression "iVar3 * 2" (identifier "iVar3") (* "*") (number_literal "2"))) () ")")))))) (; ";")) (if_statement "if (iVar2 < 0) break;" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);" (assignment_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =\n               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" (pointer_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" (* "*") (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (pointer_expression "*(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" (* "*") (cast_expression "(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd)" (( "(") (binary_expression "*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd" (binary_expression "*(int *)(iVar4 + 4) + iVar2 * 0x10" (pointer_expression "*(int *)(iVar4 + 4)" (* "*") (cast_expression "(int *)(iVar4 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 4)" (( "(") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4")) () ")")))) (+ "+") (binary_expression "iVar2 * 0x10" (identifier "iVar2") (* "*") (number_literal "0x10"))) (+ "+") (number_literal "0xd")) () ")"))))) (; ";")) (labeled_statement "LAB_00051cf8:\n          iVar2 = iVar3 + 1;" (statement_identifier "LAB_00051cf8") (: ":") (expression_statement "iVar2 = iVar3 + 1;" (assignment_expression "iVar2 = iVar3 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";"))) (if_statement "if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;" (if "if") (parenthesized_expression "((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1)" (( "(") (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1" (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(ushort *)(param_2 + 0x34)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x34)" (( "(") (binary_expression "param_2 + 0x34" (identifier "param_2") (+ "+") (number_literal "0x34")) () ")")))) (<= "<=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) () ")")) (goto_statement "goto LAB_00051d4c;" (goto "goto") (statement_identifier "LAB_00051d4c") (; ";"))) (} "}"))) (if_statement "if (iVar2 != -1) {\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }" (if "if") (parenthesized_expression "(iVar2 != -1)" (( "(") (binary_expression "iVar2 != -1" (identifier "iVar2") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));\n          if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }\n          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;\n          goto LAB_00051cf8;\n        }" ({ "{") (expression_statement "iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));" (assignment_expression "iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" (identifier "iVar2") (= "=") (call_expression "FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" (identifier "FUN_00048a04") (argument_list "(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4))" (( "(") (pointer_expression "*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4)" (( "(") (binary_expression "*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4" (binary_expression "*(int *)(param_2 + 0x28) + iVar3 * 0x14" (pointer_expression "*(int *)(param_2 + 0x28)" (* "*") (cast_expression "(int *)(param_2 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x28)" (( "(") (binary_expression "param_2 + 0x28" (identifier "param_2") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (binary_expression "iVar3 * 0x14" (identifier "iVar3") (* "*") (number_literal "0x14"))) (+ "+") (number_literal "4")) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n            iVar2 = 0x41;\n          }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            iVar2 = 0x41;\n          }" ({ "{") (expression_statement "iVar2 = 0x41;" (assignment_expression "iVar2 = 0x41" (identifier "iVar2") (= "=") (number_literal "0x41")) (; ";")) (} "}"))) (expression_statement "*(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;" (assignment_expression "*(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2" (pointer_expression "*(char *)(*(int *)(param_2 + 0x10) + iVar3)" (* "*") (cast_expression "(char *)(*(int *)(param_2 + 0x10) + iVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (cast_expression "(char)iVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar2"))) (; ";")) (goto_statement "goto LAB_00051cf8;" (goto "goto") (statement_identifier "LAB_00051cf8") (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;" (assignment_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44" (pointer_expression "*(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" (* "*") (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (number_literal "0x44")) (; ";")) (expression_statement "iVar2 = iVar3 + 1;" (assignment_expression "iVar2 = iVar3 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34))" (( "(") (binary_expression "iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34)" (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1")) (< "<") (binary_expression "(int)(uint)*(ushort *)(param_2 + 0x34)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(ushort *)(param_2 + 0x34)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x34)" (( "(") (binary_expression "param_2 + 0x34" (identifier "param_2") (+ "+") (number_literal "0x34")) () ")"))))) () ")")) (; ";")) (labeled_statement "LAB_00051d4c:\n      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);" (statement_identifier "LAB_00051d4c") (: ":") (expression_statement "puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);" (assignment_expression "puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 0x10) + iVar3 + 1)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) + iVar3 + 1" (binary_expression "*(int *)(param_2 + 0x10) + iVar3" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (identifier "iVar3")) (+ "+") (number_literal "1")) () ")")))) (; ";"))) (} "}"))) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = *(int *)(param_2 + 0x10);" (assignment_expression "iVar4 = *(int *)(param_2 + 0x10)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (} "}")))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

char * function_1(type_1 *db,type_2 *pIdx)

{
  type_3 extraout_var;
  char *var_3;
  int var_6;
  char cVar3;
  type_4 var_4;
  int var_7;
  type_5 *pTVar6;
  type_6 in_stack_ffffffd4;
  
  if (pIdx->zColAff != (char *)0x0) {
    return pIdx->zColAff;
  }
  pTVar6 = pIdx->pTable;
  var_3 = (char *)var_1(var_2(&_gp,in_stack_ffffffd4));
  pIdx->zColAff = var_3;
  if (var_3 == (char *)0x0) {
    var_4._0_1_ = db->temp_store;
    var_4._1_1_ = db->mallocFailed;
    var_4._2_1_ = db->bBenignMalloc;
    var_4._3_1_ = db->dfltLockMode;
    var_3 = (char *)0x0;
    if ((var_4 & 0xffff00) == 0) {
      var_5(db);
    }
  }
  else {
    var_6 = 0;
    if (pIdx->nColumn != 0) {
      do {
        while( true ) {
          var_7 = var_6;
          var_6 = (int)pIdx->aiColumn[var_7];
          if (var_6 < 0) break;
          pIdx->zColAff[var_7] = pTVar6->aCol[var_6].affinity;
LAB_00051cf8:
          var_6 = var_7 + 1;
          if ((int)(type_4)pIdx->nColumn <= var_7 + 1) goto FUN_00051d4c;
        }
        if (var_6 != -1) {
          cVar3 = var_8(pIdx->aColExpr->a[var_7].pExpr);
          var_6 = var_9(extraout_var,cVar3);
          if (var_6 == 0) {
            var_6 = 0x41;
          }
          pIdx->zColAff[var_7] = (char)var_6;
          goto LAB_00051cf8;
        }
        pIdx->zColAff[var_7] = 'D';
        var_6 = var_7 + 1;
      } while (var_7 + 1 < (int)(type_4)pIdx->nColumn);
FUN_00051d4c:
      var_3 = pIdx->zColAff + var_7 + 1;
    }
    *var_3 = '\0';
    var_3 = pIdx->zColAff;
  }
  return var_3;
}


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

int MASKED(int param_1,int param_2)

{
  undefined1 *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)(param_2 + 0x10) != 0) {
    return *(int *)(param_2 + 0x10);
  }
  iVar4 = *(int *)(param_2 + 0xc);
  puVar1 = (undefined1 *)FUN_0004d4b8(0,*(ushort *)(param_2 + 0x34) + 1);
  *(undefined1 **)(param_2 + 0x10) = puVar1;
  if (puVar1 == (undefined1 *)0x0) {
    iVar4 = 0;
    if ((*(uint *)(param_1 + 0x50) & 0xffff00) == 0) {
      FUN_0005082c(param_1);
    }
  }
  else {
    iVar2 = 0;
    if (*(short *)(param_2 + 0x34) != 0) {
      do {
        while( true ) {
          iVar3 = iVar2;
          iVar2 = (int)*(short *)(*(int *)(param_2 + 4) + iVar3 * 2);
          if (iVar2 < 0) break;
          *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) =
               *(undefined1 *)(*(int *)(iVar4 + 4) + iVar2 * 0x10 + 0xd);
LAB_00051cf8:
          iVar2 = iVar3 + 1;
          if ((int)(uint)*(ushort *)(param_2 + 0x34) <= iVar3 + 1) goto LAB_00051d4c;
        }
        if (iVar2 != -1) {
          iVar2 = FUN_00048a04(*(undefined4 *)(*(int *)(param_2 + 0x28) + iVar3 * 0x14 + 4));
          if (iVar2 == 0) {
            iVar2 = 0x41;
          }
          *(char *)(*(int *)(param_2 + 0x10) + iVar3) = (char)iVar2;
          goto LAB_00051cf8;
        }
        *(undefined1 *)(*(int *)(param_2 + 0x10) + iVar3) = 0x44;
        iVar2 = iVar3 + 1;
      } while (iVar3 + 1 < (int)(uint)*(ushort *)(param_2 + 0x34));
LAB_00051d4c:
      puVar1 = (undefined1 *)(*(int *)(param_2 + 0x10) + iVar3 + 1);
    }
    *puVar1 = 0;
    iVar4 = *(int *)(param_2 + 0x10);
  }
  return iVar4;
}

