
int __regparm3 sqlite3SchemaToIndex(sqlite3 *db,Schema *pSchema)

{
  Schema *pSVar1;
  int iVar2;
  
  iVar2 = 0;
  pSVar1 = db->aDb->pSchema;
  while (pSchema != pSVar1) {
    iVar2 = iVar2 + 1;
    pSVar1 = db->aDb[iVar2].pSchema;
  }
  return iVar2;
}



void __regparm3 FUN_00046080(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar2 = 0;
  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);
  while (param_2 != iVar1) {
    iVar2 = iVar2 + 1;
    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);
  }
  return;
}


PUSH EBX
MOV EBX,dword ptr [EAX + 0x10]
XOR EAX,EAX
CMP EDX,dword ptr [EBX + 0xc]
JZ 0x0004609e
LEA ESI,[ESI]
NOP
ADD EAX,0x1
MOV ECX,EAX
SHL ECX,0x4
CMP dword ptr [EBX + ECX*0x1 + 0xc],EDX
JNZ 0x00046090
POP EBX
RET
(translation_unit "void __regparm3 FUN_00046080(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00046080(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00046080(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  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);" (assignment_expression "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc)" identifier = (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc)" * (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc)" ( (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) ))))) ;) (while_statement "while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }" while (parenthesized_expression "(param_2 != iVar1)" ( (binary_expression "param_2 != iVar1" identifier != identifier) )) (compound_statement "{\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);" (assignment_expression "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" identifier = (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" * (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" ( (binary_expression "*(int *)(param_1 + 0x10) + 0xc + iVar2 * 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 "iVar2 * 0x10" identifier * number_literal)) ))))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "int __regparm3 sqlite3SchemaToIndex(sqlite3 *db,Schema *pSchema)\n\n{\n  Schema *pSVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  pSVar1 = db->aDb->pSchema;\n  while (pSchema != pSVar1) {\n    iVar2 = iVar2 + 1;\n    pSVar1 = db->aDb[iVar2].pSchema;\n  }\n  return iVar2;\n}\n\n" (function_definition "int __regparm3 sqlite3SchemaToIndex(sqlite3 *db,Schema *pSchema)\n\n{\n  Schema *pSVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  pSVar1 = db->aDb->pSchema;\n  while (pSchema != pSVar1) {\n    iVar2 = iVar2 + 1;\n    pSVar1 = db->aDb[iVar2].pSchema;\n  }\n  return iVar2;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3SchemaToIndex(sqlite3 *db,Schema *pSchema)" identifier (parameter_list "(sqlite3 *db,Schema *pSchema)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "Schema *pSchema" type_identifier (pointer_declarator "*pSchema" * identifier)) ))) (compound_statement "{\n  Schema *pSVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  pSVar1 = db->aDb->pSchema;\n  while (pSchema != pSVar1) {\n    iVar2 = iVar2 + 1;\n    pSVar1 = db->aDb[iVar2].pSchema;\n  }\n  return iVar2;\n}" { (declaration "Schema *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "pSVar1 = db->aDb->pSchema;" (assignment_expression "pSVar1 = db->aDb->pSchema" identifier = (field_expression "db->aDb->pSchema" (field_expression "db->aDb" identifier -> field_identifier) -> field_identifier)) ;) (while_statement "while (pSchema != pSVar1) {\n    iVar2 = iVar2 + 1;\n    pSVar1 = db->aDb[iVar2].pSchema;\n  }" while (parenthesized_expression "(pSchema != pSVar1)" ( (binary_expression "pSchema != pSVar1" identifier != identifier) )) (compound_statement "{\n    iVar2 = iVar2 + 1;\n    pSVar1 = db->aDb[iVar2].pSchema;\n  }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "pSVar1 = db->aDb[iVar2].pSchema;" (assignment_expression "pSVar1 = db->aDb[iVar2].pSchema" identifier = (field_expression "db->aDb[iVar2].pSchema" (subscript_expression "db->aDb[iVar2]" (field_expression "db->aDb" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "void __regparm3 FUN_00046080(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00046080(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00046080(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  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);" (assignment_expression "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc)" identifier = (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc)" * (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc)" ( (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) ))))) ;) (while_statement "while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }" while (parenthesized_expression "(param_2 != iVar1)" ( (binary_expression "param_2 != iVar1" identifier != identifier) )) (compound_statement "{\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);" (assignment_expression "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" identifier = (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" * (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" ( (binary_expression "*(int *)(param_1 + 0x10) + 0xc + iVar2 * 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 "iVar2 * 0x10" identifier * number_literal)) ))))) ;) })) (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 IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (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)) ))))) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00046080(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00046080(int param_1,int param_2)" (identifier "FUN_00046080") (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  int iVar1;\n  int iVar2;\n  \n  iVar2 = 0;\n  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);\n  while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);" (assignment_expression "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc)" (* "*") (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc)" (( "(") (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")) () ")"))))) (; ";")) (while_statement "while (param_2 != iVar1) {\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }" (while "while") (parenthesized_expression "(param_2 != iVar1)" (( "(") (binary_expression "param_2 != iVar1" (identifier "param_2") (!= "!=") (identifier "iVar1")) () ")")) (compound_statement "{\n    iVar2 = iVar2 + 1;\n    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);\n  }" ({ "{") (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);" (assignment_expression "iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" (* "*") (cast_expression "(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10)" (( "(") (binary_expression "*(int *)(param_1 + 0x10) + 0xc + iVar2 * 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 "iVar2 * 0x10" (identifier "iVar2") (* "*") (number_literal "0x10"))) () ")"))))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

int __regparm3 function_1(type_1 *db,type_2 *var_1)

{
  type_2 *var_2;
  int var_3;
  
  var_3 = 0;
  var_2 = db->aDb->var_1;
  while (var_1 != var_2) {
    var_3 = var_3 + 1;
    var_2 = db->aDb[var_3].var_1;
  }
  return var_3;
}


(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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_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: (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))))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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: (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)))))))))) (return_statement))))

void __regparm3 MASKED(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar2 = 0;
  iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc);
  while (param_2 != iVar1) {
    iVar2 = iVar2 + 1;
    iVar1 = *(int *)(*(int *)(param_1 + 0x10) + 0xc + iVar2 * 0x10);
  }
  return;
}

