
int sqlite3VtabSavepoint(sqlite3 *db,int op,int iSavepoint)

{
  VTable *pVTab;
  sqlite3_module *psVar1;
  int iVar2;
  _func_int_sqlite3_vtab_ptr_int *p_Var3;
  int iVar4;
  long lVar5;
  
  iVar4 = 0;
LAB_00123e60:
  iVar2 = db->nVTrans;
  lVar5 = (long)iVar4 << 3;
  if (iVar2 <= iVar4) {
    return 0;
  }
  do {
    iVar4 = iVar4 + 1;
    pVTab = *(VTable **)((long)db->aVTrans + lVar5);
    if ((pVTab->pVtab != (sqlite3_vtab *)0x0) &&
       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {
      pVTab->nRef = pVTab->nRef + 1;
      if (op == 0) {
        p_Var3 = psVar1->xSavepoint;
        pVTab->iSavepoint = iSavepoint + 1;
      }
      else if (op == 2) {
        p_Var3 = psVar1->xRollbackTo;
      }
      else {
        p_Var3 = psVar1->xRelease;
      }
      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))
      break;
      sqlite3VtabUnlock(pVTab);
      iVar2 = db->nVTrans;
    }
    lVar5 = lVar5 + 8;
    if (iVar2 <= iVar4) {
      return 0;
    }
  } while( true );
  iVar2 = (*p_Var3)(pVTab->pVtab,iSavepoint);
  sqlite3VtabUnlock(pVTab);
  if (iVar2 != 0) {
    return iVar2;
  }
  goto LAB_00123e60;
}



int FUN_00123e40(long param_1,int param_2,int param_3)

{
  long lVar1;
  int *piVar2;
  int iVar3;
  code *pcVar4;
  int iVar5;
  long lVar6;
  
  iVar5 = 0;
LAB_00123e60:
  iVar3 = *(int *)(param_1 + 0x1d4);
  lVar6 = (long)iVar5 << 3;
  if (iVar3 <= iVar5) {
    return 0;
  }
  do {
    iVar5 = iVar5 + 1;
    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);
    if ((*(long *)(lVar1 + 0x10) != 0) &&
       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {
      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;
      if (param_2 == 0) {
        pcVar4 = *(code **)(piVar2 + 0x28);
        *(int *)(lVar1 + 0x20) = param_3 + 1;
      }
      else if (param_2 == 2) {
        pcVar4 = *(code **)(piVar2 + 0x2c);
      }
      else {
        pcVar4 = *(code **)(piVar2 + 0x2a);
      }
      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;
      FUN_0011a780(lVar1);
      iVar3 = *(int *)(param_1 + 0x1d4);
    }
    lVar6 = lVar6 + 8;
    if (iVar3 <= iVar5) {
      return 0;
    }
  } while( true );
  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);
  FUN_0011a780(lVar1);
  if (iVar3 != 0) {
    return iVar3;
  }
  goto LAB_00123e60;
}


PUSH R15
LEA EAX,[RDX + 0x1]
MOV R15,RDI
PUSH R14
MOV R14D,ESI
PUSH R13
MOV R13D,EDX
PUSH R12
PUSH RBP
XOR EBP,EBP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RSP + 0xc],EAX
MOV EDX,dword ptr [R15 + 0x1d4]
MOVSXD R12,EBP
SHL R12,0x3
CMP EDX,EBP
JLE 0x00123f0b
NOP word ptr CS:[RAX + RAX*0x1]
MOV RAX,qword ptr [R15 + 0x1f8]
ADD EBP,0x1
MOV RBX,qword ptr [RAX + R12*0x1]
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00123eff
MOV RAX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX],0x1
JLE 0x00123eff
ADD dword ptr [RBX + 0x18],0x1
TEST R14D,R14D
JZ 0x00123f20
CMP R14D,0x2
JZ 0x00123f10
MOV RAX,qword ptr [RAX + 0xa8]
TEST RAX,RAX
JZ 0x00123ef0
CMP R13D,dword ptr [RBX + 0x20]
JGE 0x00123ef0
MOV ESI,R13D
CALL RAX
MOV RDI,RBX
MOV R12D,EAX
CALL 0x0011a780
TEST R12D,R12D
JZ 0x00123e60
ADD RSP,0x18
MOV EAX,R12D
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV RDI,RBX
CALL 0x0011a780
MOV EDX,dword ptr [R15 + 0x1d4]
ADD R12,0x8
CMP EDX,EBP
JG 0x00123e80
XOR R12D,R12D
JMP 0x00123ed9
MOV RAX,qword ptr [RAX + 0xb0]
JMP 0x00123eb9
MOV ECX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RAX + 0xa0]
MOV dword ptr [RBX + 0x20],ECX
JMP 0x00123eb9
(translation_unit "int FUN_00123e40(long param_1,int param_2,int param_3)\n\n{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}\n\n" (function_definition "int FUN_00123e40(long param_1,int param_2,int param_3)\n\n{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}" primitive_type (function_declarator "FUN_00123e40(long param_1,int param_2,int param_3)" identifier (parameter_list "(long param_1,int param_2,int param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "code *pcVar4;" type_identifier (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);" statement_identifier : (expression_statement "iVar3 = *(int *)(param_1 + 0x1d4);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x1d4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1d4)" * (cast_expression "(int *)(param_1 + 0x1d4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1d4)" ( (binary_expression "param_1 + 0x1d4" identifier + number_literal) ))))) ;)) (expression_statement "lVar6 = (long)iVar5 << 3;" (assignment_expression "lVar6 = (long)iVar5 << 3" identifier = (binary_expression "(long)iVar5 << 3" (cast_expression "(long)iVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) << number_literal)) ;) (if_statement "if (iVar3 <= iVar5) {\n    return 0;\n  }" if (parenthesized_expression "(iVar3 <= iVar5)" ( (binary_expression "iVar3 <= iVar5" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );" do (compound_statement "{\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);" (assignment_expression "lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" identifier = (pointer_expression "*(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" * (cast_expression "(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x1f8) + lVar6)" ( (binary_expression "*(long *)(param_1 + 0x1f8) + lVar6" (pointer_expression "*(long *)(param_1 + 0x1f8)" * (cast_expression "(long *)(param_1 + 0x1f8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f8)" ( (binary_expression "param_1 + 0x1f8" identifier + number_literal) )))) + identifier) ))))) ;) (if_statement "if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }" if (parenthesized_expression "((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2))" ( (binary_expression "(*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)" (parenthesized_expression "(*(long *)(lVar1 + 0x10) != 0)" ( (binary_expression "*(long *)(lVar1 + 0x10) != 0" (pointer_expression "*(long *)(lVar1 + 0x10)" * (cast_expression "(long *)(lVar1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)" ( (comma_expression "piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2" (assignment_expression "piVar2 = (int *)**(undefined8 **)(lVar1 + 8)" identifier = (cast_expression "(int *)**(undefined8 **)(lVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined8 **)(lVar1 + 8)" * (pointer_expression "*(undefined8 **)(lVar1 + 8)" * (cast_expression "(undefined8 **)(lVar1 + 8)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar1 + 8)" ( (binary_expression "lVar1 + 8" identifier + number_literal) ))))))) , (binary_expression "1 < *piVar2" number_literal < (pointer_expression "*piVar2" * identifier))) ))) )) (compound_statement "{\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }" { (expression_statement "*(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;" (assignment_expression "*(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1" (pointer_expression "*(int *)(lVar1 + 0x18)" * (cast_expression "(int *)(lVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(int *)(lVar1 + 0x18) + 1" (pointer_expression "*(int *)(lVar1 + 0x18)" * (cast_expression "(int *)(lVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) + number_literal)) ;) (if_statement "if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }" { (expression_statement "pcVar4 = *(code **)(piVar2 + 0x28);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x28)" identifier = (pointer_expression "*(code **)(piVar2 + 0x28)" * (cast_expression "(code **)(piVar2 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 0x28)" ( (binary_expression "piVar2 + 0x28" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(lVar1 + 0x20) = param_3 + 1;" (assignment_expression "*(int *)(lVar1 + 0x20) = param_3 + 1" (pointer_expression "*(int *)(lVar1 + 0x20)" * (cast_expression "(int *)(lVar1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x20)" ( (binary_expression "lVar1 + 0x20" identifier + number_literal) )))) = (binary_expression "param_3 + 1" identifier + number_literal)) ;) }) (else_clause "else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" else (if_statement "if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" if (parenthesized_expression "(param_2 == 2)" ( (binary_expression "param_2 == 2" identifier == number_literal) )) (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }" { (expression_statement "pcVar4 = *(code **)(piVar2 + 0x2c);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x2c)" identifier = (pointer_expression "*(code **)(piVar2 + 0x2c)" * (cast_expression "(code **)(piVar2 + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 0x2c)" ( (binary_expression "piVar2 + 0x2c" identifier + number_literal) ))))) ;) }) (else_clause "else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" else (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" { (expression_statement "pcVar4 = *(code **)(piVar2 + 0x2a);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x2a)" identifier = (pointer_expression "*(code **)(piVar2 + 0x2a)" * (cast_expression "(code **)(piVar2 + 0x2a)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 0x2a)" ( (binary_expression "piVar2 + 0x2a" identifier + number_literal) ))))) ;) }))))) (if_statement "if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;" if (parenthesized_expression "((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20)))" ( (binary_expression "(pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))" (parenthesized_expression "(pcVar4 != (code *)0x0)" ( (binary_expression "pcVar4 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(param_3 < *(int *)(lVar1 + 0x20))" ( (binary_expression "param_3 < *(int *)(lVar1 + 0x20)" identifier < (pointer_expression "*(int *)(lVar1 + 0x20)" * (cast_expression "(int *)(lVar1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x20)" ( (binary_expression "lVar1 + 0x20" identifier + number_literal) ))))) ))) )) (break_statement "break;" break ;)) (expression_statement "FUN_0011a780(lVar1);" (call_expression "FUN_0011a780(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x1d4);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x1d4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1d4)" * (cast_expression "(int *)(param_1 + 0x1d4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1d4)" ( (binary_expression "param_1 + 0x1d4" identifier + number_literal) ))))) ;) })) (expression_statement "lVar6 = lVar6 + 8;" (assignment_expression "lVar6 = lVar6 + 8" identifier = (binary_expression "lVar6 + 8" identifier + number_literal)) ;) (if_statement "if (iVar3 <= iVar5) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 <= iVar5)" ( (binary_expression "iVar3 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) (expression_statement "iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);" (assignment_expression "iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3)" identifier = (call_expression "(*pcVar4)(*(long *)(lVar1 + 0x10),param_3)" (parenthesized_expression "(*pcVar4)" ( (pointer_expression "*pcVar4" * identifier) )) (argument_list "(*(long *)(lVar1 + 0x10),param_3)" ( (pointer_expression "*(long *)(lVar1 + 0x10)" * (cast_expression "(long *)(lVar1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "FUN_0011a780(lVar1);" (call_expression "FUN_0011a780(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) (if_statement "if (iVar3 != 0) {\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) (goto_statement "goto LAB_00123e60;" goto statement_identifier ;) })))
(translation_unit "int sqlite3VtabSavepoint(sqlite3 *db,int op,int iSavepoint)\n\n{\n  VTable *pVTab;\n  sqlite3_module *psVar1;\n  int iVar2;\n  _func_int_sqlite3_vtab_ptr_int *p_Var3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 0;\nLAB_00123e60:\n  iVar2 = db->nVTrans;\n  lVar5 = (long)iVar4 << 3;\n  if (iVar2 <= iVar4) {\n    return 0;\n  }\n  do {\n    iVar4 = iVar4 + 1;\n    pVTab = *(VTable **)((long)db->aVTrans + lVar5);\n    if ((pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {\n      pVTab->nRef = pVTab->nRef + 1;\n      if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }\n      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;\n      sqlite3VtabUnlock(pVTab);\n      iVar2 = db->nVTrans;\n    }\n    lVar5 = lVar5 + 8;\n    if (iVar2 <= iVar4) {\n      return 0;\n    }\n  } while( true );\n  iVar2 = (*p_Var3)(pVTab->pVtab,iSavepoint);\n  sqlite3VtabUnlock(pVTab);\n  if (iVar2 != 0) {\n    return iVar2;\n  }\n  goto LAB_00123e60;\n}\n\n" (function_definition "int sqlite3VtabSavepoint(sqlite3 *db,int op,int iSavepoint)\n\n{\n  VTable *pVTab;\n  sqlite3_module *psVar1;\n  int iVar2;\n  _func_int_sqlite3_vtab_ptr_int *p_Var3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 0;\nLAB_00123e60:\n  iVar2 = db->nVTrans;\n  lVar5 = (long)iVar4 << 3;\n  if (iVar2 <= iVar4) {\n    return 0;\n  }\n  do {\n    iVar4 = iVar4 + 1;\n    pVTab = *(VTable **)((long)db->aVTrans + lVar5);\n    if ((pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {\n      pVTab->nRef = pVTab->nRef + 1;\n      if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }\n      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;\n      sqlite3VtabUnlock(pVTab);\n      iVar2 = db->nVTrans;\n    }\n    lVar5 = lVar5 + 8;\n    if (iVar2 <= iVar4) {\n      return 0;\n    }\n  } while( true );\n  iVar2 = (*p_Var3)(pVTab->pVtab,iSavepoint);\n  sqlite3VtabUnlock(pVTab);\n  if (iVar2 != 0) {\n    return iVar2;\n  }\n  goto LAB_00123e60;\n}" primitive_type (function_declarator "sqlite3VtabSavepoint(sqlite3 *db,int op,int iSavepoint)" identifier (parameter_list "(sqlite3 *db,int op,int iSavepoint)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "int op" primitive_type identifier) , (parameter_declaration "int iSavepoint" primitive_type identifier) ))) (compound_statement "{\n  VTable *pVTab;\n  sqlite3_module *psVar1;\n  int iVar2;\n  _func_int_sqlite3_vtab_ptr_int *p_Var3;\n  int iVar4;\n  long lVar5;\n  \n  iVar4 = 0;\nLAB_00123e60:\n  iVar2 = db->nVTrans;\n  lVar5 = (long)iVar4 << 3;\n  if (iVar2 <= iVar4) {\n    return 0;\n  }\n  do {\n    iVar4 = iVar4 + 1;\n    pVTab = *(VTable **)((long)db->aVTrans + lVar5);\n    if ((pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {\n      pVTab->nRef = pVTab->nRef + 1;\n      if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }\n      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;\n      sqlite3VtabUnlock(pVTab);\n      iVar2 = db->nVTrans;\n    }\n    lVar5 = lVar5 + 8;\n    if (iVar2 <= iVar4) {\n      return 0;\n    }\n  } while( true );\n  iVar2 = (*p_Var3)(pVTab->pVtab,iSavepoint);\n  sqlite3VtabUnlock(pVTab);\n  if (iVar2 != 0) {\n    return iVar2;\n  }\n  goto LAB_00123e60;\n}" { (declaration "VTable *pVTab;" type_identifier (pointer_declarator "*pVTab" * identifier) ;) (declaration "sqlite3_module *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "_func_int_sqlite3_vtab_ptr_int *p_Var3;" type_identifier (pointer_declarator "*p_Var3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00123e60:\n  iVar2 = db->nVTrans;" statement_identifier : (expression_statement "iVar2 = db->nVTrans;" (assignment_expression "iVar2 = db->nVTrans" identifier = (field_expression "db->nVTrans" identifier -> field_identifier)) ;)) (expression_statement "lVar5 = (long)iVar4 << 3;" (assignment_expression "lVar5 = (long)iVar4 << 3" identifier = (binary_expression "(long)iVar4 << 3" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) << number_literal)) ;) (if_statement "if (iVar2 <= iVar4) {\n    return 0;\n  }" if (parenthesized_expression "(iVar2 <= iVar4)" ( (binary_expression "iVar2 <= iVar4" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    iVar4 = iVar4 + 1;\n    pVTab = *(VTable **)((long)db->aVTrans + lVar5);\n    if ((pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {\n      pVTab->nRef = pVTab->nRef + 1;\n      if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }\n      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;\n      sqlite3VtabUnlock(pVTab);\n      iVar2 = db->nVTrans;\n    }\n    lVar5 = lVar5 + 8;\n    if (iVar2 <= iVar4) {\n      return 0;\n    }\n  } while( true );" do (compound_statement "{\n    iVar4 = iVar4 + 1;\n    pVTab = *(VTable **)((long)db->aVTrans + lVar5);\n    if ((pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {\n      pVTab->nRef = pVTab->nRef + 1;\n      if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }\n      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;\n      sqlite3VtabUnlock(pVTab);\n      iVar2 = db->nVTrans;\n    }\n    lVar5 = lVar5 + 8;\n    if (iVar2 <= iVar4) {\n      return 0;\n    }\n  }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "pVTab = *(VTable **)((long)db->aVTrans + lVar5);" (assignment_expression "pVTab = *(VTable **)((long)db->aVTrans + lVar5)" identifier = (pointer_expression "*(VTable **)((long)db->aVTrans + lVar5)" * (cast_expression "(VTable **)((long)db->aVTrans + lVar5)" ( (type_descriptor "VTable **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((long)db->aVTrans + lVar5)" ( (binary_expression "(long)db->aVTrans + lVar5" (cast_expression "(long)db->aVTrans" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "db->aVTrans" identifier -> field_identifier)) + identifier) ))))) ;) (if_statement "if ((pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {\n      pVTab->nRef = pVTab->nRef + 1;\n      if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }\n      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;\n      sqlite3VtabUnlock(pVTab);\n      iVar2 = db->nVTrans;\n    }" if (parenthesized_expression "((pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion))" ( (binary_expression "(pVTab->pVtab != (sqlite3_vtab *)0x0) &&\n       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)" (parenthesized_expression "(pVTab->pVtab != (sqlite3_vtab *)0x0)" ( (binary_expression "pVTab->pVtab != (sqlite3_vtab *)0x0" (field_expression "pVTab->pVtab" identifier -> field_identifier) != (cast_expression "(sqlite3_vtab *)0x0" ( (type_descriptor "sqlite3_vtab *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)" ( (comma_expression "psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion" (assignment_expression "psVar1 = pVTab->pMod->pModule" identifier = (field_expression "pVTab->pMod->pModule" (field_expression "pVTab->pMod" identifier -> field_identifier) -> field_identifier)) , (binary_expression "1 < psVar1->iVersion" number_literal < (field_expression "psVar1->iVersion" identifier -> field_identifier))) ))) )) (compound_statement "{\n      pVTab->nRef = pVTab->nRef + 1;\n      if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }\n      if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;\n      sqlite3VtabUnlock(pVTab);\n      iVar2 = db->nVTrans;\n    }" { (expression_statement "pVTab->nRef = pVTab->nRef + 1;" (assignment_expression "pVTab->nRef = pVTab->nRef + 1" (field_expression "pVTab->nRef" identifier -> field_identifier) = (binary_expression "pVTab->nRef + 1" (field_expression "pVTab->nRef" identifier -> field_identifier) + number_literal)) ;) (if_statement "if (op == 0) {\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }\n      else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }" if (parenthesized_expression "(op == 0)" ( (binary_expression "op == 0" identifier == number_literal) )) (compound_statement "{\n        p_Var3 = psVar1->xSavepoint;\n        pVTab->iSavepoint = iSavepoint + 1;\n      }" { (expression_statement "p_Var3 = psVar1->xSavepoint;" (assignment_expression "p_Var3 = psVar1->xSavepoint" identifier = (field_expression "psVar1->xSavepoint" identifier -> field_identifier)) ;) (expression_statement "pVTab->iSavepoint = iSavepoint + 1;" (assignment_expression "pVTab->iSavepoint = iSavepoint + 1" (field_expression "pVTab->iSavepoint" identifier -> field_identifier) = (binary_expression "iSavepoint + 1" identifier + number_literal)) ;) }) (else_clause "else if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }" else (if_statement "if (op == 2) {\n        p_Var3 = psVar1->xRollbackTo;\n      }\n      else {\n        p_Var3 = psVar1->xRelease;\n      }" if (parenthesized_expression "(op == 2)" ( (binary_expression "op == 2" identifier == number_literal) )) (compound_statement "{\n        p_Var3 = psVar1->xRollbackTo;\n      }" { (expression_statement "p_Var3 = psVar1->xRollbackTo;" (assignment_expression "p_Var3 = psVar1->xRollbackTo" identifier = (field_expression "psVar1->xRollbackTo" identifier -> field_identifier)) ;) }) (else_clause "else {\n        p_Var3 = psVar1->xRelease;\n      }" else (compound_statement "{\n        p_Var3 = psVar1->xRelease;\n      }" { (expression_statement "p_Var3 = psVar1->xRelease;" (assignment_expression "p_Var3 = psVar1->xRelease" identifier = (field_expression "psVar1->xRelease" identifier -> field_identifier)) ;) }))))) (if_statement "if ((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))\n      break;" if (parenthesized_expression "((p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint))" ( (binary_expression "(p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0) && (iSavepoint < pVTab->iSavepoint)" (parenthesized_expression "(p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0)" ( (binary_expression "p_Var3 != (_func_int_sqlite3_vtab_ptr_int *)0x0" identifier != (cast_expression "(_func_int_sqlite3_vtab_ptr_int *)0x0" ( (type_descriptor "_func_int_sqlite3_vtab_ptr_int *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iSavepoint < pVTab->iSavepoint)" ( (binary_expression "iSavepoint < pVTab->iSavepoint" identifier < (field_expression "pVTab->iSavepoint" identifier -> field_identifier)) ))) )) (break_statement "break;" break ;)) (expression_statement "sqlite3VtabUnlock(pVTab);" (call_expression "sqlite3VtabUnlock(pVTab)" identifier (argument_list "(pVTab)" ( identifier ))) ;) (expression_statement "iVar2 = db->nVTrans;" (assignment_expression "iVar2 = db->nVTrans" identifier = (field_expression "db->nVTrans" identifier -> field_identifier)) ;) })) (expression_statement "lVar5 = lVar5 + 8;" (assignment_expression "lVar5 = lVar5 + 8" identifier = (binary_expression "lVar5 + 8" identifier + number_literal)) ;) (if_statement "if (iVar2 <= iVar4) {\n      return 0;\n    }" if (parenthesized_expression "(iVar2 <= iVar4)" ( (binary_expression "iVar2 <= iVar4" identifier <= identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) (expression_statement "iVar2 = (*p_Var3)(pVTab->pVtab,iSavepoint);" (assignment_expression "iVar2 = (*p_Var3)(pVTab->pVtab,iSavepoint)" identifier = (call_expression "(*p_Var3)(pVTab->pVtab,iSavepoint)" (parenthesized_expression "(*p_Var3)" ( (pointer_expression "*p_Var3" * identifier) )) (argument_list "(pVTab->pVtab,iSavepoint)" ( (field_expression "pVTab->pVtab" identifier -> field_identifier) , identifier )))) ;) (expression_statement "sqlite3VtabUnlock(pVTab);" (call_expression "sqlite3VtabUnlock(pVTab)" identifier (argument_list "(pVTab)" ( identifier ))) ;) (if_statement "if (iVar2 != 0) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (goto_statement "goto LAB_00123e60;" goto statement_identifier ;) })))
(translation_unit "int FUN_00123e40(long param_1,int param_2,int param_3)\n\n{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}\n\n" (function_definition "int FUN_00123e40(long param_1,int param_2,int param_3)\n\n{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}" primitive_type (function_declarator "FUN_00123e40(long param_1,int param_2,int param_3)" identifier (parameter_list "(long param_1,int param_2,int param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "code *pcVar4;" type_identifier (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);" statement_identifier : (expression_statement "iVar3 = *(int *)(param_1 + 0x1d4);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x1d4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1d4)" * (cast_expression "(int *)(param_1 + 0x1d4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1d4)" ( (binary_expression "param_1 + 0x1d4" identifier + number_literal) ))))) ;)) (expression_statement "lVar6 = (long)iVar5 << 3;" (assignment_expression "lVar6 = (long)iVar5 << 3" identifier = (binary_expression "(long)iVar5 << 3" (cast_expression "(long)iVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) << number_literal)) ;) (if_statement "if (iVar3 <= iVar5) {\n    return 0;\n  }" if (parenthesized_expression "(iVar3 <= iVar5)" ( (binary_expression "iVar3 <= iVar5" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );" do (compound_statement "{\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);" (assignment_expression "lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" identifier = (pointer_expression "*(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" * (cast_expression "(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x1f8) + lVar6)" ( (binary_expression "*(long *)(param_1 + 0x1f8) + lVar6" (pointer_expression "*(long *)(param_1 + 0x1f8)" * (cast_expression "(long *)(param_1 + 0x1f8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1f8)" ( (binary_expression "param_1 + 0x1f8" identifier + number_literal) )))) + identifier) ))))) ;) (if_statement "if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }" if (parenthesized_expression "((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2))" ( (binary_expression "(*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)" (parenthesized_expression "(*(long *)(lVar1 + 0x10) != 0)" ( (binary_expression "*(long *)(lVar1 + 0x10) != 0" (pointer_expression "*(long *)(lVar1 + 0x10)" * (cast_expression "(long *)(lVar1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)" ( (comma_expression "piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2" (assignment_expression "piVar2 = (int *)**(undefined8 **)(lVar1 + 8)" identifier = (cast_expression "(int *)**(undefined8 **)(lVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined8 **)(lVar1 + 8)" * (pointer_expression "*(undefined8 **)(lVar1 + 8)" * (cast_expression "(undefined8 **)(lVar1 + 8)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar1 + 8)" ( (binary_expression "lVar1 + 8" identifier + number_literal) ))))))) , (binary_expression "1 < *piVar2" number_literal < (pointer_expression "*piVar2" * identifier))) ))) )) (compound_statement "{\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }" { (expression_statement "*(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;" (assignment_expression "*(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1" (pointer_expression "*(int *)(lVar1 + 0x18)" * (cast_expression "(int *)(lVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(int *)(lVar1 + 0x18) + 1" (pointer_expression "*(int *)(lVar1 + 0x18)" * (cast_expression "(int *)(lVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) + number_literal)) ;) (if_statement "if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }" { (expression_statement "pcVar4 = *(code **)(piVar2 + 0x28);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x28)" identifier = (pointer_expression "*(code **)(piVar2 + 0x28)" * (cast_expression "(code **)(piVar2 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 0x28)" ( (binary_expression "piVar2 + 0x28" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(lVar1 + 0x20) = param_3 + 1;" (assignment_expression "*(int *)(lVar1 + 0x20) = param_3 + 1" (pointer_expression "*(int *)(lVar1 + 0x20)" * (cast_expression "(int *)(lVar1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x20)" ( (binary_expression "lVar1 + 0x20" identifier + number_literal) )))) = (binary_expression "param_3 + 1" identifier + number_literal)) ;) }) (else_clause "else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" else (if_statement "if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" if (parenthesized_expression "(param_2 == 2)" ( (binary_expression "param_2 == 2" identifier == number_literal) )) (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }" { (expression_statement "pcVar4 = *(code **)(piVar2 + 0x2c);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x2c)" identifier = (pointer_expression "*(code **)(piVar2 + 0x2c)" * (cast_expression "(code **)(piVar2 + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 0x2c)" ( (binary_expression "piVar2 + 0x2c" identifier + number_literal) ))))) ;) }) (else_clause "else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" else (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" { (expression_statement "pcVar4 = *(code **)(piVar2 + 0x2a);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x2a)" identifier = (pointer_expression "*(code **)(piVar2 + 0x2a)" * (cast_expression "(code **)(piVar2 + 0x2a)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 0x2a)" ( (binary_expression "piVar2 + 0x2a" identifier + number_literal) ))))) ;) }))))) (if_statement "if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;" if (parenthesized_expression "((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20)))" ( (binary_expression "(pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))" (parenthesized_expression "(pcVar4 != (code *)0x0)" ( (binary_expression "pcVar4 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(param_3 < *(int *)(lVar1 + 0x20))" ( (binary_expression "param_3 < *(int *)(lVar1 + 0x20)" identifier < (pointer_expression "*(int *)(lVar1 + 0x20)" * (cast_expression "(int *)(lVar1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x20)" ( (binary_expression "lVar1 + 0x20" identifier + number_literal) ))))) ))) )) (break_statement "break;" break ;)) (expression_statement "FUN_0011a780(lVar1);" (call_expression "FUN_0011a780(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x1d4);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x1d4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1d4)" * (cast_expression "(int *)(param_1 + 0x1d4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1d4)" ( (binary_expression "param_1 + 0x1d4" identifier + number_literal) ))))) ;) })) (expression_statement "lVar6 = lVar6 + 8;" (assignment_expression "lVar6 = lVar6 + 8" identifier = (binary_expression "lVar6 + 8" identifier + number_literal)) ;) (if_statement "if (iVar3 <= iVar5) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 <= iVar5)" ( (binary_expression "iVar3 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) (expression_statement "iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);" (assignment_expression "iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3)" identifier = (call_expression "(*pcVar4)(*(long *)(lVar1 + 0x10),param_3)" (parenthesized_expression "(*pcVar4)" ( (pointer_expression "*pcVar4" * identifier) )) (argument_list "(*(long *)(lVar1 + 0x10),param_3)" ( (pointer_expression "*(long *)(lVar1 + 0x10)" * (cast_expression "(long *)(lVar1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "FUN_0011a780(lVar1);" (call_expression "FUN_0011a780(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) (if_statement "if (iVar3 != 0) {\n    return iVar3;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) (goto_statement "goto LAB_00123e60;" goto statement_identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;)) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) << LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))))) , (binary_expression LIT < (pointer_expression * IDENT))) ))) )) (compound_statement { (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 IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_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 IDENT + LIT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (break_statement break ;)) (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) ))))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) }) while (parenthesized_expression ( BOOL )) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (goto_statement goto statement_identifier ;) })))
(function_definition "int FUN_00123e40(long param_1,int param_2,int param_3)\n\n{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}" (primitive_type "int") (function_declarator "FUN_00123e40(long param_1,int param_2,int param_3)" (identifier "FUN_00123e40") (parameter_list "(long param_1,int param_2,int param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  long lVar1;\n  int *piVar2;\n  int iVar3;\n  code *pcVar4;\n  int iVar5;\n  long lVar6;\n  \n  iVar5 = 0;\nLAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);\n  lVar6 = (long)iVar5 << 3;\n  if (iVar3 <= iVar5) {\n    return 0;\n  }\n  do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );\n  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);\n  FUN_0011a780(lVar1);\n  if (iVar3 != 0) {\n    return iVar3;\n  }\n  goto LAB_00123e60;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "code *pcVar4;" (type_identifier "code") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "long lVar6;" (sized_type_specifier "long" (long "long")) (identifier "lVar6") (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_00123e60:\n  iVar3 = *(int *)(param_1 + 0x1d4);" (statement_identifier "LAB_00123e60") (: ":") (expression_statement "iVar3 = *(int *)(param_1 + 0x1d4);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x1d4)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x1d4)" (* "*") (cast_expression "(int *)(param_1 + 0x1d4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1d4)" (( "(") (binary_expression "param_1 + 0x1d4" (identifier "param_1") (+ "+") (number_literal "0x1d4")) () ")"))))) (; ";"))) (expression_statement "lVar6 = (long)iVar5 << 3;" (assignment_expression "lVar6 = (long)iVar5 << 3" (identifier "lVar6") (= "=") (binary_expression "(long)iVar5 << 3" (cast_expression "(long)iVar5" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar5")) (<< "<<") (number_literal "3"))) (; ";")) (if_statement "if (iVar3 <= iVar5) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar3 <= iVar5)" (( "(") (binary_expression "iVar3 <= iVar5" (identifier "iVar3") (<= "<=") (identifier "iVar5")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (do_statement "do {\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  } while( true );" (do "do") (compound_statement "{\n    iVar5 = iVar5 + 1;\n    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);\n    if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }\n    lVar6 = lVar6 + 8;\n    if (iVar3 <= iVar5) {\n      return 0;\n    }\n  }" ({ "{") (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);" (assignment_expression "lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" (* "*") (cast_expression "(long *)(*(long *)(param_1 + 0x1f8) + lVar6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_1 + 0x1f8) + lVar6)" (( "(") (binary_expression "*(long *)(param_1 + 0x1f8) + lVar6" (pointer_expression "*(long *)(param_1 + 0x1f8)" (* "*") (cast_expression "(long *)(param_1 + 0x1f8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1f8)" (( "(") (binary_expression "param_1 + 0x1f8" (identifier "param_1") (+ "+") (number_literal "0x1f8")) () ")")))) (+ "+") (identifier "lVar6")) () ")"))))) (; ";")) (if_statement "if ((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }" (if "if") (parenthesized_expression "((*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2))" (( "(") (binary_expression "(*(long *)(lVar1 + 0x10) != 0) &&\n       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)" (parenthesized_expression "(*(long *)(lVar1 + 0x10) != 0)" (( "(") (binary_expression "*(long *)(lVar1 + 0x10) != 0" (pointer_expression "*(long *)(lVar1 + 0x10)" (* "*") (cast_expression "(long *)(lVar1 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x10)" (( "(") (binary_expression "lVar1 + 0x10" (identifier "lVar1") (+ "+") (number_literal "0x10")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)" (( "(") (comma_expression "piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2" (assignment_expression "piVar2 = (int *)**(undefined8 **)(lVar1 + 8)" (identifier "piVar2") (= "=") (cast_expression "(int *)**(undefined8 **)(lVar1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "**(undefined8 **)(lVar1 + 8)" (* "*") (pointer_expression "*(undefined8 **)(lVar1 + 8)" (* "*") (cast_expression "(undefined8 **)(lVar1 + 8)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar1 + 8)" (( "(") (binary_expression "lVar1 + 8" (identifier "lVar1") (+ "+") (number_literal "8")) () ")"))))))) (, ",") (binary_expression "1 < *piVar2" (number_literal "1") (< "<") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")))) () ")"))) () ")")) (compound_statement "{\n      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;\n      if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }\n      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;\n      FUN_0011a780(lVar1);\n      iVar3 = *(int *)(param_1 + 0x1d4);\n    }" ({ "{") (expression_statement "*(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;" (assignment_expression "*(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1" (pointer_expression "*(int *)(lVar1 + 0x18)" (* "*") (cast_expression "(int *)(lVar1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "*(int *)(lVar1 + 0x18) + 1" (pointer_expression "*(int *)(lVar1 + 0x18)" (* "*") (cast_expression "(int *)(lVar1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_2 == 0) {\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }\n      else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x28);\n        *(int *)(lVar1 + 0x20) = param_3 + 1;\n      }" ({ "{") (expression_statement "pcVar4 = *(code **)(piVar2 + 0x28);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x28)" (identifier "pcVar4") (= "=") (pointer_expression "*(code **)(piVar2 + 0x28)" (* "*") (cast_expression "(code **)(piVar2 + 0x28)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(piVar2 + 0x28)" (( "(") (binary_expression "piVar2 + 0x28" (identifier "piVar2") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "*(int *)(lVar1 + 0x20) = param_3 + 1;" (assignment_expression "*(int *)(lVar1 + 0x20) = param_3 + 1" (pointer_expression "*(int *)(lVar1 + 0x20)" (* "*") (cast_expression "(int *)(lVar1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x20)" (( "(") (binary_expression "lVar1 + 0x20" (identifier "lVar1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" (else "else") (if_statement "if (param_2 == 2) {\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }\n      else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" (if "if") (parenthesized_expression "(param_2 == 2)" (( "(") (binary_expression "param_2 == 2" (identifier "param_2") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x2c);\n      }" ({ "{") (expression_statement "pcVar4 = *(code **)(piVar2 + 0x2c);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x2c)" (identifier "pcVar4") (= "=") (pointer_expression "*(code **)(piVar2 + 0x2c)" (* "*") (cast_expression "(code **)(piVar2 + 0x2c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(piVar2 + 0x2c)" (( "(") (binary_expression "piVar2 + 0x2c" (identifier "piVar2") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" (else "else") (compound_statement "{\n        pcVar4 = *(code **)(piVar2 + 0x2a);\n      }" ({ "{") (expression_statement "pcVar4 = *(code **)(piVar2 + 0x2a);" (assignment_expression "pcVar4 = *(code **)(piVar2 + 0x2a)" (identifier "pcVar4") (= "=") (pointer_expression "*(code **)(piVar2 + 0x2a)" (* "*") (cast_expression "(code **)(piVar2 + 0x2a)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(piVar2 + 0x2a)" (( "(") (binary_expression "piVar2 + 0x2a" (identifier "piVar2") (+ "+") (number_literal "0x2a")) () ")"))))) (; ";")) (} "}")))))) (if_statement "if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;" (if "if") (parenthesized_expression "((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20)))" (( "(") (binary_expression "(pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))" (parenthesized_expression "(pcVar4 != (code *)0x0)" (( "(") (binary_expression "pcVar4 != (code *)0x0" (identifier "pcVar4") (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(param_3 < *(int *)(lVar1 + 0x20))" (( "(") (binary_expression "param_3 < *(int *)(lVar1 + 0x20)" (identifier "param_3") (< "<") (pointer_expression "*(int *)(lVar1 + 0x20)" (* "*") (cast_expression "(int *)(lVar1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x20)" (( "(") (binary_expression "lVar1 + 0x20" (identifier "lVar1") (+ "+") (number_literal "0x20")) () ")"))))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "FUN_0011a780(lVar1);" (call_expression "FUN_0011a780(lVar1)" (identifier "FUN_0011a780") (argument_list "(lVar1)" (( "(") (identifier "lVar1") () ")"))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x1d4);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x1d4)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x1d4)" (* "*") (cast_expression "(int *)(param_1 + 0x1d4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1d4)" (( "(") (binary_expression "param_1 + 0x1d4" (identifier "param_1") (+ "+") (number_literal "0x1d4")) () ")"))))) (; ";")) (} "}"))) (expression_statement "lVar6 = lVar6 + 8;" (assignment_expression "lVar6 = lVar6 + 8" (identifier "lVar6") (= "=") (binary_expression "lVar6 + 8" (identifier "lVar6") (+ "+") (number_literal "8"))) (; ";")) (if_statement "if (iVar3 <= iVar5) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar3 <= iVar5)" (( "(") (binary_expression "iVar3 <= iVar5" (identifier "iVar3") (<= "<=") (identifier "iVar5")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (expression_statement "iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);" (assignment_expression "iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3)" (identifier "iVar3") (= "=") (call_expression "(*pcVar4)(*(long *)(lVar1 + 0x10),param_3)" (parenthesized_expression "(*pcVar4)" (( "(") (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) () ")")) (argument_list "(*(long *)(lVar1 + 0x10),param_3)" (( "(") (pointer_expression "*(long *)(lVar1 + 0x10)" (* "*") (cast_expression "(long *)(lVar1 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x10)" (( "(") (binary_expression "lVar1 + 0x10" (identifier "lVar1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "FUN_0011a780(lVar1);" (call_expression "FUN_0011a780(lVar1)" (identifier "FUN_0011a780") (argument_list "(lVar1)" (( "(") (identifier "lVar1") () ")"))) (; ";")) (if_statement "if (iVar3 != 0) {\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return iVar3;\n  }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (goto_statement "goto LAB_00123e60;" (goto "goto") (statement_identifier "LAB_00123e60") (; ";")) (} "}")))

int function_1(type_1 *db,int var_4,int var_5)

{
  type_2 *pVTab;
  type_3 *psVar1;
  int var_1;
  type_4 *var_6;
  int var_2;
  long var_3;
  
  var_2 = 0;
LAB_00123e60:
  var_1 = db->nVTrans;
  var_3 = (long)var_2 << 3;
  if (var_1 <= var_2) {
    return 0;
  }
  do {
    var_2 = var_2 + 1;
    pVTab = *(type_2 **)((long)db->aVTrans + var_3);
    if ((pVTab->pVtab != (type_5 *)0x0) &&
       (psVar1 = pVTab->pMod->pModule, 1 < psVar1->iVersion)) {
      pVTab->nRef = pVTab->nRef + 1;
      if (var_4 == 0) {
        var_6 = psVar1->xSavepoint;
        pVTab->var_5 = var_5 + 1;
      }
      else if (var_4 == 2) {
        var_6 = psVar1->xRollbackTo;
      }
      else {
        var_6 = psVar1->xRelease;
      }
      if ((var_6 != (type_4 *)0x0) && (var_5 < pVTab->var_5))
      break;
      var_7(pVTab);
      var_1 = db->nVTrans;
    }
    var_3 = var_3 + 8;
    if (var_1 <= var_2) {
      return 0;
    }
  } while( true );
  var_1 = (*var_6)(pVTab->pVtab,var_5);
  var_7(pVTab);
  if (var_1 != 0) {
    return var_1;
  }
  goto LAB_00123e60;
}


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

int MASKED(long param_1,int param_2,int param_3)

{
  long lVar1;
  int *piVar2;
  int iVar3;
  code *pcVar4;
  int iVar5;
  long lVar6;
  
  iVar5 = 0;
LAB_00123e60:
  iVar3 = *(int *)(param_1 + 0x1d4);
  lVar6 = (long)iVar5 << 3;
  if (iVar3 <= iVar5) {
    return 0;
  }
  do {
    iVar5 = iVar5 + 1;
    lVar1 = *(long *)(*(long *)(param_1 + 0x1f8) + lVar6);
    if ((*(long *)(lVar1 + 0x10) != 0) &&
       (piVar2 = (int *)**(undefined8 **)(lVar1 + 8), 1 < *piVar2)) {
      *(int *)(lVar1 + 0x18) = *(int *)(lVar1 + 0x18) + 1;
      if (param_2 == 0) {
        pcVar4 = *(code **)(piVar2 + 0x28);
        *(int *)(lVar1 + 0x20) = param_3 + 1;
      }
      else if (param_2 == 2) {
        pcVar4 = *(code **)(piVar2 + 0x2c);
      }
      else {
        pcVar4 = *(code **)(piVar2 + 0x2a);
      }
      if ((pcVar4 != (code *)0x0) && (param_3 < *(int *)(lVar1 + 0x20))) break;
      FUN_0011a780(lVar1);
      iVar3 = *(int *)(param_1 + 0x1d4);
    }
    lVar6 = lVar6 + 8;
    if (iVar3 <= iVar5) {
      return 0;
    }
  } while( true );
  iVar3 = (*pcVar4)(*(long *)(lVar1 + 0x10),param_3);
  FUN_0011a780(lVar1);
  if (iVar3 != 0) {
    return iVar3;
  }
  goto LAB_00123e60;
}

