
void __regparm3 sqlite3ResetOneSchema(sqlite3 *db,int iDb)

{
  u16 *puVar1;
  Db *pDVar2;
  Schema *p;
  int iVar3;
  int iVar4;
  
  if (-1 < iDb) {
    pDVar2 = db->aDb;
    puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags;
    *puVar1 = *puVar1 | 8;
    puVar1 = &(pDVar2[1].pSchema)->schemaFlags;
    *puVar1 = *puVar1 | 8;
    db->mDbFlags = db->mDbFlags & 0xffffffef;
  }
  if ((db->nSchemaLock == 0) && (iVar3 = db->nDb, 0 < iVar3)) {
    iVar4 = 0;
    do {
      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {
        iVar4 = iVar4 + 1;
        if (iVar3 <= iVar4) {
          return;
        }
      }
      iVar4 = iVar4 + 1;
      sqlite3SchemaClear(p);
      iVar3 = db->nDb;
      if (iVar3 <= iVar4) {
        return;
      }
    } while( true );
  }
  return;
}



void __regparm3 FUN_00058140(int param_1,int param_2)

{
  ushort *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (-1 < param_2) {
    iVar3 = *(int *)(param_1 + 0x10);
    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);
    *puVar1 = *puVar1 | 8;
    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);
    *puVar1 = *puVar1 | 8;
    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;
  }
  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {
    iVar4 = 0;
    do {
      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),
            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {
        iVar4 = iVar4 + 1;
        if (iVar3 <= iVar4) {
          return;
        }
      }
      iVar4 = iVar4 + 1;
      FUN_00057a10(iVar2);
      iVar3 = *(int *)(param_1 + 0x14);
      if (iVar3 <= iVar4) {
        return;
      }
    } while( true );
  }
  return;
}


TEST EDX,EDX
JS 0x0005815f
MOV ECX,dword ptr [EAX + 0x10]
SHL EDX,0x4
MOV EDX,dword ptr [ECX + EDX*0x1 + 0xc]
OR word ptr [EDX + 0x4e],0x8
MOV EDX,dword ptr [ECX + 0x1c]
OR word ptr [EDX + 0x4e],0x8
AND dword ptr [EAX + 0x18],0xffffffef
MOV EDX,dword ptr [EAX + 0x34]
TEST EDX,EDX
JNZ 0x000581b8
MOV EDX,dword ptr [EAX + 0x14]
TEST EDX,EDX
JLE 0x000581b8
PUSH ESI
PUSH EBX
MOV ESI,EAX
XOR EBX,EBX
SUB ESP,0x4
MOV ECX,dword ptr [ESI + 0x10]
MOV EAX,EBX
SHL EAX,0x4
MOV EAX,dword ptr [ECX + EAX*0x1 + 0xc]
TEST byte ptr [EAX + 0x4e],0x8
JNZ 0x00058198
ADD EBX,0x1
CMP EBX,EDX
JL 0x00058179
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0xc
ADD EBX,0x1
PUSH EAX
CALL 0x00057a10
MOV EDX,dword ptr [ESI + 0x14]
ADD ESP,0x10
CMP EDX,EBX
JG 0x00058176
ADD ESP,0x4
POP EBX
POP ESI
RET
RET
(translation_unit "void __regparm3 FUN_00058140(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00058140(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00058140(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  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" { (declaration "ushort *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 (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);" (assignment_expression "puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" identifier = (cast_expression "(ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" ( (binary_expression "*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e" (pointer_expression "*(int *)(iVar3 + 0xc + param_2 * 0x10)" * (cast_expression "(int *)(iVar3 + 0xc + param_2 * 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc + param_2 * 0x10)" ( (binary_expression "iVar3 + 0xc + param_2 * 0x10" (binary_expression "iVar3 + 0xc" identifier + number_literal) + (binary_expression "param_2 * 0x10" identifier * number_literal)) )))) + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (expression_statement "puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);" (assignment_expression "puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e)" identifier = (cast_expression "(ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar3 + 0x1c) + 0x4e)" ( (binary_expression "*(int *)(iVar3 + 0x1c) + 0x4e" (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;" (assignment_expression "*(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(uint *)(param_1 + 0x18) & 0xffffffef" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) & number_literal)) ;) })) (if_statement "if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" if (parenthesized_expression "((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3))" ( (binary_expression "(*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)" (parenthesized_expression "(*(int *)(param_1 + 0x34) == 0)" ( (binary_expression "*(int *)(param_1 + 0x34) == 0" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)" ( (comma_expression "iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3" (assignment_expression "iVar3 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) , (binary_expression "0 < iVar3" number_literal < identifier)) ))) )) (compound_statement "{\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );" do (compound_statement "{\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    }" { (while_statement "while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" while (parenthesized_expression "(iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0)" ( (comma_expression "iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0" (assignment_expression "iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" identifier = (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" * (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" ( (binary_expression "*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10" (binary_expression "*(int *)(param_1 + 0x10) + 0xc" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) + number_literal) + (binary_expression "iVar4 * 0x10" identifier * number_literal)) ))))) , (binary_expression "(*(byte *)(iVar2 + 0x4e) & 8) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x4e) & 8)" ( (binary_expression "*(byte *)(iVar2 + 0x4e) & 8" (pointer_expression "*(byte *)(iVar2 + 0x4e)" * (cast_expression "(byte *)(iVar2 + 0x4e)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x4e)" ( (binary_expression "iVar2 + 0x4e" identifier + number_literal) )))) & number_literal) )) == number_literal)) )) (compound_statement "{\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 <= iVar4) {\n          return;\n        }" if (parenthesized_expression "(iVar3 <= iVar4)" ( (binary_expression "iVar3 <= iVar4" identifier <= identifier) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "FUN_00057a10(iVar2);" (call_expression "FUN_00057a10(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 <= iVar4) {\n        return;\n      }" if (parenthesized_expression "(iVar3 <= iVar4)" ( (binary_expression "iVar3 <= iVar4" identifier <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 sqlite3ResetOneSchema(sqlite3 *db,int iDb)\n\n{\n  u16 *puVar1;\n  Db *pDVar2;\n  Schema *p;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < iDb) {\n    pDVar2 = db->aDb;\n    puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    puVar1 = &(pDVar2[1].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    db->mDbFlags = db->mDbFlags & 0xffffffef;\n  }\n  if ((db->nSchemaLock == 0) && (iVar3 = db->nDb, 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      sqlite3SchemaClear(p);\n      iVar3 = db->nDb;\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 sqlite3ResetOneSchema(sqlite3 *db,int iDb)\n\n{\n  u16 *puVar1;\n  Db *pDVar2;\n  Schema *p;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < iDb) {\n    pDVar2 = db->aDb;\n    puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    puVar1 = &(pDVar2[1].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    db->mDbFlags = db->mDbFlags & 0xffffffef;\n  }\n  if ((db->nSchemaLock == 0) && (iVar3 = db->nDb, 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      sqlite3SchemaClear(p);\n      iVar3 = db->nDb;\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3ResetOneSchema(sqlite3 *db,int iDb)" identifier (parameter_list "(sqlite3 *db,int iDb)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "int iDb" primitive_type identifier) ))) (compound_statement "{\n  u16 *puVar1;\n  Db *pDVar2;\n  Schema *p;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < iDb) {\n    pDVar2 = db->aDb;\n    puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    puVar1 = &(pDVar2[1].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    db->mDbFlags = db->mDbFlags & 0xffffffef;\n  }\n  if ((db->nSchemaLock == 0) && (iVar3 = db->nDb, 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      sqlite3SchemaClear(p);\n      iVar3 = db->nDb;\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" { (declaration "u16 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "Db *pDVar2;" type_identifier (pointer_declarator "*pDVar2" * identifier) ;) (declaration "Schema *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (-1 < iDb) {\n    pDVar2 = db->aDb;\n    puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    puVar1 = &(pDVar2[1].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    db->mDbFlags = db->mDbFlags & 0xffffffef;\n  }" if (parenthesized_expression "(-1 < iDb)" ( (binary_expression "-1 < iDb" number_literal < identifier) )) (compound_statement "{\n    pDVar2 = db->aDb;\n    puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    puVar1 = &(pDVar2[1].pSchema)->schemaFlags;\n    *puVar1 = *puVar1 | 8;\n    db->mDbFlags = db->mDbFlags & 0xffffffef;\n  }" { (expression_statement "pDVar2 = db->aDb;" (assignment_expression "pDVar2 = db->aDb" identifier = (field_expression "db->aDb" identifier -> field_identifier)) ;) (expression_statement "puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags;" (assignment_expression "puVar1 = &(pDVar2[iDb].pSchema)->schemaFlags" identifier = (pointer_expression "&(pDVar2[iDb].pSchema)->schemaFlags" & (field_expression "(pDVar2[iDb].pSchema)->schemaFlags" (parenthesized_expression "(pDVar2[iDb].pSchema)" ( (field_expression "pDVar2[iDb].pSchema" (subscript_expression "pDVar2[iDb]" identifier [ identifier ]) . field_identifier) )) -> field_identifier))) ;) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (expression_statement "puVar1 = &(pDVar2[1].pSchema)->schemaFlags;" (assignment_expression "puVar1 = &(pDVar2[1].pSchema)->schemaFlags" identifier = (pointer_expression "&(pDVar2[1].pSchema)->schemaFlags" & (field_expression "(pDVar2[1].pSchema)->schemaFlags" (parenthesized_expression "(pDVar2[1].pSchema)" ( (field_expression "pDVar2[1].pSchema" (subscript_expression "pDVar2[1]" identifier [ number_literal ]) . field_identifier) )) -> field_identifier))) ;) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (expression_statement "db->mDbFlags = db->mDbFlags & 0xffffffef;" (assignment_expression "db->mDbFlags = db->mDbFlags & 0xffffffef" (field_expression "db->mDbFlags" identifier -> field_identifier) = (binary_expression "db->mDbFlags & 0xffffffef" (field_expression "db->mDbFlags" identifier -> field_identifier) & number_literal)) ;) })) (if_statement "if ((db->nSchemaLock == 0) && (iVar3 = db->nDb, 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      sqlite3SchemaClear(p);\n      iVar3 = db->nDb;\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" if (parenthesized_expression "((db->nSchemaLock == 0) && (iVar3 = db->nDb, 0 < iVar3))" ( (binary_expression "(db->nSchemaLock == 0) && (iVar3 = db->nDb, 0 < iVar3)" (parenthesized_expression "(db->nSchemaLock == 0)" ( (binary_expression "db->nSchemaLock == 0" (field_expression "db->nSchemaLock" identifier -> field_identifier) == number_literal) )) && (parenthesized_expression "(iVar3 = db->nDb, 0 < iVar3)" ( (comma_expression "iVar3 = db->nDb, 0 < iVar3" (assignment_expression "iVar3 = db->nDb" identifier = (field_expression "db->nDb" identifier -> field_identifier)) , (binary_expression "0 < iVar3" number_literal < identifier)) ))) )) (compound_statement "{\n    iVar4 = 0;\n    do {\n      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      sqlite3SchemaClear(p);\n      iVar3 = db->nDb;\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      sqlite3SchemaClear(p);\n      iVar3 = db->nDb;\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );" do (compound_statement "{\n      while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      sqlite3SchemaClear(p);\n      iVar3 = db->nDb;\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    }" { (while_statement "while (p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" while (parenthesized_expression "(p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0)" ( (comma_expression "p = db->aDb[iVar4].pSchema, (p->schemaFlags & 8) == 0" (assignment_expression "p = db->aDb[iVar4].pSchema" identifier = (field_expression "db->aDb[iVar4].pSchema" (subscript_expression "db->aDb[iVar4]" (field_expression "db->aDb" identifier -> field_identifier) [ identifier ]) . field_identifier)) , (binary_expression "(p->schemaFlags & 8) == 0" (parenthesized_expression "(p->schemaFlags & 8)" ( (binary_expression "p->schemaFlags & 8" (field_expression "p->schemaFlags" identifier -> field_identifier) & number_literal) )) == number_literal)) )) (compound_statement "{\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 <= iVar4) {\n          return;\n        }" if (parenthesized_expression "(iVar3 <= iVar4)" ( (binary_expression "iVar3 <= iVar4" identifier <= identifier) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "sqlite3SchemaClear(p);" (call_expression "sqlite3SchemaClear(p)" identifier (argument_list "(p)" ( identifier ))) ;) (expression_statement "iVar3 = db->nDb;" (assignment_expression "iVar3 = db->nDb" identifier = (field_expression "db->nDb" identifier -> field_identifier)) ;) (if_statement "if (iVar3 <= iVar4) {\n        return;\n      }" if (parenthesized_expression "(iVar3 <= iVar4)" ( (binary_expression "iVar3 <= iVar4" identifier <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00058140(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00058140(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00058140(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  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" { (declaration "ushort *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 (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);" (assignment_expression "puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" identifier = (cast_expression "(ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" ( (binary_expression "*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e" (pointer_expression "*(int *)(iVar3 + 0xc + param_2 * 0x10)" * (cast_expression "(int *)(iVar3 + 0xc + param_2 * 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc + param_2 * 0x10)" ( (binary_expression "iVar3 + 0xc + param_2 * 0x10" (binary_expression "iVar3 + 0xc" identifier + number_literal) + (binary_expression "param_2 * 0x10" identifier * number_literal)) )))) + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (expression_statement "puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);" (assignment_expression "puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e)" identifier = (cast_expression "(ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar3 + 0x1c) + 0x4e)" ( (binary_expression "*(int *)(iVar3 + 0x1c) + 0x4e" (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;" (assignment_expression "*(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(uint *)(param_1 + 0x18) & 0xffffffef" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) & number_literal)) ;) })) (if_statement "if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" if (parenthesized_expression "((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3))" ( (binary_expression "(*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)" (parenthesized_expression "(*(int *)(param_1 + 0x34) == 0)" ( (binary_expression "*(int *)(param_1 + 0x34) == 0" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)" ( (comma_expression "iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3" (assignment_expression "iVar3 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) , (binary_expression "0 < iVar3" number_literal < identifier)) ))) )) (compound_statement "{\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );" do (compound_statement "{\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    }" { (while_statement "while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" while (parenthesized_expression "(iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0)" ( (comma_expression "iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0" (assignment_expression "iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" identifier = (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" * (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" ( (binary_expression "*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10" (binary_expression "*(int *)(param_1 + 0x10) + 0xc" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) + number_literal) + (binary_expression "iVar4 * 0x10" identifier * number_literal)) ))))) , (binary_expression "(*(byte *)(iVar2 + 0x4e) & 8) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x4e) & 8)" ( (binary_expression "*(byte *)(iVar2 + 0x4e) & 8" (pointer_expression "*(byte *)(iVar2 + 0x4e)" * (cast_expression "(byte *)(iVar2 + 0x4e)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x4e)" ( (binary_expression "iVar2 + 0x4e" identifier + number_literal) )))) & number_literal) )) == number_literal)) )) (compound_statement "{\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 <= iVar4) {\n          return;\n        }" if (parenthesized_expression "(iVar3 <= iVar4)" ( (binary_expression "iVar3 <= iVar4" identifier <= identifier) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "FUN_00057a10(iVar2);" (call_expression "FUN_00057a10(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 <= iVar4) {\n        return;\n      }" if (parenthesized_expression "(iVar3 <= iVar4)" ( (binary_expression "iVar3 <= iVar4" identifier <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (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 LIT < IDENT) )) (compound_statement { (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 *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) | LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) , (binary_expression LIT < IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression 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) )))) + LIT) + (binary_expression IDENT * LIT)) ))))) , (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 (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return ;) })) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return ;) })) }) while (parenthesized_expression ( BOOL )) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00058140(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00058140(int param_1,int param_2)" (identifier "FUN_00058140") (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  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }\n  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }\n  return;\n}" ({ "{") (declaration "ushort *puVar1;" (type_identifier "ushort") (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 (-1 < param_2) {\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }" (if "if") (parenthesized_expression "(-1 < param_2)" (( "(") (binary_expression "-1 < param_2" (number_literal "-1") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    iVar3 = *(int *)(param_1 + 0x10);\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);\n    *puVar1 = *puVar1 | 8;\n    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;\n  }" ({ "{") (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);" (assignment_expression "puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" (identifier "puVar1") (= "=") (cast_expression "(ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e)" (( "(") (binary_expression "*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e" (pointer_expression "*(int *)(iVar3 + 0xc + param_2 * 0x10)" (* "*") (cast_expression "(int *)(iVar3 + 0xc + param_2 * 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc + param_2 * 0x10)" (( "(") (binary_expression "iVar3 + 0xc + param_2 * 0x10" (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) (+ "+") (binary_expression "param_2 * 0x10" (identifier "param_2") (* "*") (number_literal "0x10"))) () ")")))) (+ "+") (number_literal "0x4e")) () ")")))) (; ";")) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (| "|") (number_literal "8"))) (; ";")) (expression_statement "puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);" (assignment_expression "puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e)" (identifier "puVar1") (= "=") (cast_expression "(ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar3 + 0x1c) + 0x4e)" (( "(") (binary_expression "*(int *)(iVar3 + 0x1c) + 0x4e" (pointer_expression "*(int *)(iVar3 + 0x1c)" (* "*") (cast_expression "(int *)(iVar3 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x1c)" (( "(") (binary_expression "iVar3 + 0x1c" (identifier "iVar3") (+ "+") (number_literal "0x1c")) () ")")))) (+ "+") (number_literal "0x4e")) () ")")))) (; ";")) (expression_statement "*puVar1 = *puVar1 | 8;" (assignment_expression "*puVar1 = *puVar1 | 8" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (binary_expression "*puVar1 | 8" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (| "|") (number_literal "8"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;" (assignment_expression "*(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef" (pointer_expression "*(uint *)(param_1 + 0x18)" (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "*(uint *)(param_1 + 0x18) & 0xffffffef" (pointer_expression "*(uint *)(param_1 + 0x18)" (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "0xffffffef"))) (; ";")) (} "}"))) (if_statement "if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" (if "if") (parenthesized_expression "((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3))" (( "(") (binary_expression "(*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)" (parenthesized_expression "(*(int *)(param_1 + 0x34) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) == 0" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)" (( "(") (comma_expression "iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3" (assignment_expression "iVar3 = *(int *)(param_1 + 0x14)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (, ",") (binary_expression "0 < iVar3" (number_literal "0") (< "<") (identifier "iVar3"))) () ")"))) () ")")) (compound_statement "{\n    iVar4 = 0;\n    do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );\n  }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    } while( true );" (do "do") (compound_statement "{\n      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }\n      iVar4 = iVar4 + 1;\n      FUN_00057a10(iVar2);\n      iVar3 = *(int *)(param_1 + 0x14);\n      if (iVar3 <= iVar4) {\n        return;\n      }\n    }" ({ "{") (while_statement "while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" (while "while") (parenthesized_expression "(iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0)" (( "(") (comma_expression "iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),\n            (*(byte *)(iVar2 + 0x4e) & 8) == 0" (assignment_expression "iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" (* "*") (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10)" (( "(") (binary_expression "*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10" (binary_expression "*(int *)(param_1 + 0x10) + 0xc" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (number_literal "0xc")) (+ "+") (binary_expression "iVar4 * 0x10" (identifier "iVar4") (* "*") (number_literal "0x10"))) () ")"))))) (, ",") (binary_expression "(*(byte *)(iVar2 + 0x4e) & 8) == 0" (parenthesized_expression "(*(byte *)(iVar2 + 0x4e) & 8)" (( "(") (binary_expression "*(byte *)(iVar2 + 0x4e) & 8" (pointer_expression "*(byte *)(iVar2 + 0x4e)" (* "*") (cast_expression "(byte *)(iVar2 + 0x4e)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x4e)" (( "(") (binary_expression "iVar2 + 0x4e" (identifier "iVar2") (+ "+") (number_literal "0x4e")) () ")")))) (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0"))) () ")")) (compound_statement "{\n        iVar4 = iVar4 + 1;\n        if (iVar3 <= iVar4) {\n          return;\n        }\n      }" ({ "{") (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar3 <= iVar4) {\n          return;\n        }" (if "if") (parenthesized_expression "(iVar3 <= iVar4)" (( "(") (binary_expression "iVar3 <= iVar4" (identifier "iVar3") (<= "<=") (identifier "iVar4")) () ")")) (compound_statement "{\n          return;\n        }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_00057a10(iVar2);" (call_expression "FUN_00057a10(iVar2)" (identifier "FUN_00057a10") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x14)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (iVar3 <= iVar4) {\n        return;\n      }" (if "if") (parenthesized_expression "(iVar3 <= iVar4)" (( "(") (binary_expression "iVar3 <= iVar4" (identifier "iVar3") (<= "<=") (identifier "iVar4")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void __regparm3 function_1(type_1 *db,int var_1)

{
  type_2 *puVar1;
  type_3 *pDVar2;
  type_4 *p;
  int var_2;
  int var_3;
  
  if (-1 < var_1) {
    pDVar2 = db->aDb;
    puVar1 = &(pDVar2[var_1].pSchema)->schemaFlags;
    *puVar1 = *puVar1 | 8;
    puVar1 = &(pDVar2[1].pSchema)->schemaFlags;
    *puVar1 = *puVar1 | 8;
    db->mDbFlags = db->mDbFlags & 0xffffffef;
  }
  if ((db->nSchemaLock == 0) && (var_2 = db->nDb, 0 < var_2)) {
    var_3 = 0;
    do {
      while (p = db->aDb[var_3].pSchema, (p->schemaFlags & 8) == 0) {
        var_3 = var_3 + 1;
        if (var_2 <= var_3) {
          return;
        }
      }
      var_3 = var_3 + 1;
      var_4(p);
      var_2 = db->nDb;
      if (var_2 <= var_3) {
        return;
      }
    } while( true );
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) 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: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (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: (identifier) right: (number_literal))))) right: (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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))) right: (parenthesized_expression (comma_expression left: (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)))))) right: (binary_expression left: (number_literal) right: (identifier)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (while_statement condition: (parenthesized_expression (comma_expression left: (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: (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)) right: (binary_expression left: (identifier) right: (number_literal))))))) right: (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)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement)))) condition: (parenthesized_expression (true))))) (return_statement))))

void __regparm3 MASKED(int param_1,int param_2)

{
  ushort *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (-1 < param_2) {
    iVar3 = *(int *)(param_1 + 0x10);
    puVar1 = (ushort *)(*(int *)(iVar3 + 0xc + param_2 * 0x10) + 0x4e);
    *puVar1 = *puVar1 | 8;
    puVar1 = (ushort *)(*(int *)(iVar3 + 0x1c) + 0x4e);
    *puVar1 = *puVar1 | 8;
    *(uint *)(param_1 + 0x18) = *(uint *)(param_1 + 0x18) & 0xffffffef;
  }
  if ((*(int *)(param_1 + 0x34) == 0) && (iVar3 = *(int *)(param_1 + 0x14), 0 < iVar3)) {
    iVar4 = 0;
    do {
      while (iVar2 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar4 * 0x10),
            (*(byte *)(iVar2 + 0x4e) & 8) == 0) {
        iVar4 = iVar4 + 1;
        if (iVar3 <= iVar4) {
          return;
        }
      }
      iVar4 = iVar4 + 1;
      FUN_00057a10(iVar2);
      iVar3 = *(int *)(param_1 + 0x14);
      if (iVar3 <= iVar4) {
        return;
      }
    } while( true );
  }
  return;
}

