
int sqlite3session_attach(sqlite3_session *pSession,char *zName)

{
  SessionTable *pSVar1;
  int iVar2;
  int iVar3;
  SessionTable *pSVar4;
  SessionTable *pSVar5;
  
  sqlite3_mutex_enter(pSession->db->mutex);
  if (zName == (char *)0x0) {
    pSession->bAutoAttach = 1;
    iVar3 = 0;
  }
  else {
    iVar2 = sqlite3Strlen30(zName);
    pSVar4 = pSession->pTable;
    if (pSVar4 != (SessionTable *)0x0) {
      do {
        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);
        if (iVar3 == 0) goto LAB_001e8666;
        pSVar4 = pSVar4->pNext;
      } while (pSVar4 != (SessionTable *)0x0);
    }
    pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);
    iVar3 = 7;
    if (pSVar4 != (SessionTable *)0x0) {
      pSVar4->pNext = (SessionTable *)0x0;
      pSVar4->nCol = 0;
      pSVar4->bStat1 = 0;
      pSVar4->azCol = (char **)0x0;
      pSVar4->abPK = (u8 *)0x0;
      pSVar4->nEntry = 0;
      pSVar4->nChange = 0;
      pSVar4->apChange = (SessionChange **)0x0;
      pSVar4->zName = (char *)(pSVar4 + 1);
      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));
      pSVar1 = pSession->pTable;
      if (pSession->pTable == (SessionTable *)0x0) {
        pSVar5 = (SessionTable *)&pSession->pTable;
      }
      else {
        do {
          pSVar5 = pSVar1;
          pSVar1 = pSVar5->pNext;
        } while (pSVar5->pNext != (SessionTable *)0x0);
      }
      pSVar5->pNext = pSVar4;
      iVar3 = 0;
    }
  }
LAB_001e8666:
  sqlite3_mutex_leave(pSession->db->mutex);
  return iVar3;
}



int FUN_001e8589(long *param_1,void *param_2)

{
  int iVar1;
  int iVar2;
  undefined8 *puVar3;
  long *plVar4;
  long *plVar5;
  
  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));
  if (param_2 == (void *)0x0) {
    *(undefined4 *)(param_1 + 3) = 1;
    iVar2 = 0;
  }
  else {
    iVar1 = FUN_00139edc(param_2);
    plVar5 = (long *)param_1[8];
    if (plVar5 != (long *)0x0) {
      do {
        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);
        if (iVar2 == 0) goto LAB_001e8666;
        plVar5 = (long *)*plVar5;
      } while (plVar5 != (long *)0x0);
    }
    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);
    iVar2 = 7;
    if (puVar3 != (undefined8 *)0x0) {
      *puVar3 = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      puVar3[4] = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[1] = puVar3 + 7;
      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));
      plVar5 = (long *)param_1[8];
      if ((long *)param_1[8] == (long *)0x0) {
        plVar4 = param_1 + 8;
      }
      else {
        do {
          plVar4 = plVar5;
          plVar5 = (long *)*plVar4;
        } while ((long *)*plVar4 != (long *)0x0);
      }
      *plVar4 = (long)puVar3;
      iVar2 = 0;
    }
  }
LAB_001e8666:
  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));
  return iVar2;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R14,RDI
MOV R12,RSI
MOV RAX,qword ptr [RDI]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0012a8c7
TEST R12,R12
JZ 0x001e8659
MOV RDI,R12
CALL 0x00139edc
MOV R15D,EAX
MOV RBX,qword ptr [R14 + 0x40]
TEST RBX,RBX
JZ 0x001e85eb
LEA R13D,[RAX + 0x1]
MOV RDI,qword ptr [RBX + 0x8]
MOV EDX,R13D
MOV RSI,R12
CALL 0x0012ada6
MOV EBP,EAX
TEST EAX,EAX
JZ 0x001e8666
MOV RBX,qword ptr [RBX]
TEST RBX,RBX
JNZ 0x001e85ca
MOVSXD RDI,R15D
ADD RDI,0x39
CALL 0x0014bbac
MOV RBX,RAX
MOV EBP,0x7
TEST RAX,RAX
JZ 0x001e8666
MOV qword ptr [RBX],0x0
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [RBX + 0x18],0x0
MOV qword ptr [RBX + 0x20],0x0
MOV qword ptr [RBX + 0x28],0x0
MOV qword ptr [RBX + 0x30],0x0
LEA RDI,[RBX + 0x38]
MOV qword ptr [RBX + 0x8],RDI
LEA EDX,[R15 + 0x1]
MOVSXD RDX,EDX
MOV RSI,R12
CALL 0x0010e670
MOV RDX,qword ptr [R14 + 0x40]
TEST RDX,RDX
JNZ 0x001e8686
LEA RDX,[R14 + 0x40]
JMP 0x001e868e
MOV dword ptr [R14 + 0x18],0x1
MOV EBP,0x0
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0012a8f6
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV RDX,RAX
MOV RAX,qword ptr [RDX]
TEST RAX,RAX
JNZ 0x001e8683
MOV qword ptr [RDX],RBX
MOV EBP,0x0
JMP 0x001e8666
(translation_unit "int FUN_001e8589(long *param_1,void *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}\n\n" (function_definition "int FUN_001e8589(long *param_1,void *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}" primitive_type (function_declarator "FUN_001e8589(long *param_1,void *param_2)" identifier (parameter_list "(long *param_1,void *param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "long *plVar4;" (sized_type_specifier "long" long) (pointer_declarator "*plVar4" * identifier) ;) (declaration "long *plVar5;" (sized_type_specifier "long" long) (pointer_declarator "*plVar5" * identifier) ;) (expression_statement "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (if_statement "if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" if (parenthesized_expression "(param_2 == (void *)0x0)" ( (binary_expression "param_2 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 3) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 3) = 1" (pointer_expression "*(undefined4 *)(param_1 + 3)" * (cast_expression "(undefined4 *)(param_1 + 3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 3)" ( (binary_expression "param_1 + 3" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" else (compound_statement "{\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" { (expression_statement "iVar1 = FUN_00139edc(param_2);" (assignment_expression "iVar1 = FUN_00139edc(param_2)" identifier = (call_expression "FUN_00139edc(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "plVar5 = (long *)param_1[8];" (assignment_expression "plVar5 = (long *)param_1[8]" identifier = (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ]))) ;) (if_statement "if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }" if (parenthesized_expression "(plVar5 != (long *)0x0)" ( (binary_expression "plVar5 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }" { (do_statement "do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);" do (compound_statement "{\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      }" { (expression_statement "iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);" (assignment_expression "iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1)" identifier = (call_expression "FUN_0012ada6(plVar5[1],param_2,iVar1 + 1)" identifier (argument_list "(plVar5[1],param_2,iVar1 + 1)" ( (subscript_expression "plVar5[1]" identifier [ number_literal ]) , identifier , (binary_expression "iVar1 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) goto LAB_001e8666;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001e8666;" goto statement_identifier ;)) (expression_statement "plVar5 = (long *)*plVar5;" (assignment_expression "plVar5 = (long *)*plVar5" identifier = (cast_expression "(long *)*plVar5" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*plVar5" * identifier))) ;) }) while (parenthesized_expression "(plVar5 != (long *)0x0)" ( (binary_expression "plVar5 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);" (assignment_expression "puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39)" identifier = (cast_expression "(undefined8 *)FUN_0014bbac((long)iVar1 + 0x39)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0014bbac((long)iVar1 + 0x39)" identifier (argument_list "((long)iVar1 + 0x39)" ( (binary_expression "(long)iVar1 + 0x39" (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = 7;" (assignment_expression "iVar2 = 7" identifier = number_literal) ;) (if_statement "if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }" if (parenthesized_expression "(puVar3 != (undefined8 *)0x0)" ( (binary_expression "puVar3 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }" { (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3[2] = 0;" (assignment_expression "puVar3[2] = 0" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[3] = 0;" (assignment_expression "puVar3[3] = 0" (subscript_expression "puVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[4] = 0;" (assignment_expression "puVar3[4] = 0" (subscript_expression "puVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[5] = 0;" (assignment_expression "puVar3[5] = 0" (subscript_expression "puVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[6] = 0;" (assignment_expression "puVar3[6] = 0" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[1] = puVar3 + 7;" (assignment_expression "puVar3[1] = puVar3 + 7" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = (binary_expression "puVar3 + 7" identifier + number_literal)) ;) (expression_statement "memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));" (call_expression "memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1))" identifier (argument_list "(puVar3 + 7,param_2,(long)(iVar1 + 1))" ( (binary_expression "puVar3 + 7" identifier + number_literal) , identifier , (cast_expression "(long)(iVar1 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) ))) ))) ;) (expression_statement "plVar5 = (long *)param_1[8];" (assignment_expression "plVar5 = (long *)param_1[8]" identifier = (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ]))) ;) (if_statement "if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" if (parenthesized_expression "((long *)param_1[8] == (long *)0x0)" ( (binary_expression "(long *)param_1[8] == (long *)0x0" (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ])) == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        plVar4 = param_1 + 8;\n      }" { (expression_statement "plVar4 = param_1 + 8;" (assignment_expression "plVar4 = param_1 + 8" identifier = (binary_expression "param_1 + 8" identifier + number_literal)) ;) }) (else_clause "else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" else (compound_statement "{\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" { (do_statement "do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);" do (compound_statement "{\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        }" { (expression_statement "plVar4 = plVar5;" (assignment_expression "plVar4 = plVar5" identifier = identifier) ;) (expression_statement "plVar5 = (long *)*plVar4;" (assignment_expression "plVar5 = (long *)*plVar4" identifier = (cast_expression "(long *)*plVar4" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*plVar4" * identifier))) ;) }) while (parenthesized_expression "((long *)*plVar4 != (long *)0x0)" ( (binary_expression "(long *)*plVar4 != (long *)0x0" (cast_expression "(long *)*plVar4" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*plVar4" * identifier)) != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (expression_statement "*plVar4 = (long)puVar3;" (assignment_expression "*plVar4 = (long)puVar3" (pointer_expression "*plVar4" * identifier) = (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) })) }))) (labeled_statement "LAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" statement_identifier : (expression_statement "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;)) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int sqlite3session_attach(sqlite3_session *pSession,char *zName)\n\n{\n  SessionTable *pSVar1;\n  int iVar2;\n  int iVar3;\n  SessionTable *pSVar4;\n  SessionTable *pSVar5;\n  \n  sqlite3_mutex_enter(pSession->db->mutex);\n  if (zName == (char *)0x0) {\n    pSession->bAutoAttach = 1;\n    iVar3 = 0;\n  }\n  else {\n    iVar2 = sqlite3Strlen30(zName);\n    pSVar4 = pSession->pTable;\n    if (pSVar4 != (SessionTable *)0x0) {\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }\n    pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);\n    iVar3 = 7;\n    if (pSVar4 != (SessionTable *)0x0) {\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }\n  }\nLAB_001e8666:\n  sqlite3_mutex_leave(pSession->db->mutex);\n  return iVar3;\n}\n\n" (function_definition "int sqlite3session_attach(sqlite3_session *pSession,char *zName)\n\n{\n  SessionTable *pSVar1;\n  int iVar2;\n  int iVar3;\n  SessionTable *pSVar4;\n  SessionTable *pSVar5;\n  \n  sqlite3_mutex_enter(pSession->db->mutex);\n  if (zName == (char *)0x0) {\n    pSession->bAutoAttach = 1;\n    iVar3 = 0;\n  }\n  else {\n    iVar2 = sqlite3Strlen30(zName);\n    pSVar4 = pSession->pTable;\n    if (pSVar4 != (SessionTable *)0x0) {\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }\n    pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);\n    iVar3 = 7;\n    if (pSVar4 != (SessionTable *)0x0) {\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }\n  }\nLAB_001e8666:\n  sqlite3_mutex_leave(pSession->db->mutex);\n  return iVar3;\n}" primitive_type (function_declarator "sqlite3session_attach(sqlite3_session *pSession,char *zName)" identifier (parameter_list "(sqlite3_session *pSession,char *zName)" ( (parameter_declaration "sqlite3_session *pSession" type_identifier (pointer_declarator "*pSession" * identifier)) , (parameter_declaration "char *zName" primitive_type (pointer_declarator "*zName" * identifier)) ))) (compound_statement "{\n  SessionTable *pSVar1;\n  int iVar2;\n  int iVar3;\n  SessionTable *pSVar4;\n  SessionTable *pSVar5;\n  \n  sqlite3_mutex_enter(pSession->db->mutex);\n  if (zName == (char *)0x0) {\n    pSession->bAutoAttach = 1;\n    iVar3 = 0;\n  }\n  else {\n    iVar2 = sqlite3Strlen30(zName);\n    pSVar4 = pSession->pTable;\n    if (pSVar4 != (SessionTable *)0x0) {\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }\n    pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);\n    iVar3 = 7;\n    if (pSVar4 != (SessionTable *)0x0) {\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }\n  }\nLAB_001e8666:\n  sqlite3_mutex_leave(pSession->db->mutex);\n  return iVar3;\n}" { (declaration "SessionTable *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "SessionTable *pSVar4;" type_identifier (pointer_declarator "*pSVar4" * identifier) ;) (declaration "SessionTable *pSVar5;" type_identifier (pointer_declarator "*pSVar5" * identifier) ;) (expression_statement "sqlite3_mutex_enter(pSession->db->mutex);" (call_expression "sqlite3_mutex_enter(pSession->db->mutex)" identifier (argument_list "(pSession->db->mutex)" ( (field_expression "pSession->db->mutex" (field_expression "pSession->db" identifier -> field_identifier) -> field_identifier) ))) ;) (if_statement "if (zName == (char *)0x0) {\n    pSession->bAutoAttach = 1;\n    iVar3 = 0;\n  }\n  else {\n    iVar2 = sqlite3Strlen30(zName);\n    pSVar4 = pSession->pTable;\n    if (pSVar4 != (SessionTable *)0x0) {\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }\n    pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);\n    iVar3 = 7;\n    if (pSVar4 != (SessionTable *)0x0) {\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }\n  }" if (parenthesized_expression "(zName == (char *)0x0)" ( (binary_expression "zName == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pSession->bAutoAttach = 1;\n    iVar3 = 0;\n  }" { (expression_statement "pSession->bAutoAttach = 1;" (assignment_expression "pSession->bAutoAttach = 1" (field_expression "pSession->bAutoAttach" identifier -> field_identifier) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = sqlite3Strlen30(zName);\n    pSVar4 = pSession->pTable;\n    if (pSVar4 != (SessionTable *)0x0) {\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }\n    pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);\n    iVar3 = 7;\n    if (pSVar4 != (SessionTable *)0x0) {\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }\n  }" else (compound_statement "{\n    iVar2 = sqlite3Strlen30(zName);\n    pSVar4 = pSession->pTable;\n    if (pSVar4 != (SessionTable *)0x0) {\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }\n    pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);\n    iVar3 = 7;\n    if (pSVar4 != (SessionTable *)0x0) {\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }\n  }" { (expression_statement "iVar2 = sqlite3Strlen30(zName);" (assignment_expression "iVar2 = sqlite3Strlen30(zName)" identifier = (call_expression "sqlite3Strlen30(zName)" identifier (argument_list "(zName)" ( identifier )))) ;) (expression_statement "pSVar4 = pSession->pTable;" (assignment_expression "pSVar4 = pSession->pTable" identifier = (field_expression "pSession->pTable" identifier -> field_identifier)) ;) (if_statement "if (pSVar4 != (SessionTable *)0x0) {\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }" if (parenthesized_expression "(pSVar4 != (SessionTable *)0x0)" ( (binary_expression "pSVar4 != (SessionTable *)0x0" identifier != (cast_expression "(SessionTable *)0x0" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);\n    }" { (do_statement "do {\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      } while (pSVar4 != (SessionTable *)0x0);" do (compound_statement "{\n        iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);\n        if (iVar3 == 0) goto LAB_001e8666;\n        pSVar4 = pSVar4->pNext;\n      }" { (expression_statement "iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1);" (assignment_expression "iVar3 = sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1)" identifier = (call_expression "sqlite3_strnicmp(pSVar4->zName,zName,iVar2 + 1)" identifier (argument_list "(pSVar4->zName,zName,iVar2 + 1)" ( (field_expression "pSVar4->zName" identifier -> field_identifier) , identifier , (binary_expression "iVar2 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar3 == 0) goto LAB_001e8666;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001e8666;" goto statement_identifier ;)) (expression_statement "pSVar4 = pSVar4->pNext;" (assignment_expression "pSVar4 = pSVar4->pNext" identifier = (field_expression "pSVar4->pNext" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pSVar4 != (SessionTable *)0x0)" ( (binary_expression "pSVar4 != (SessionTable *)0x0" identifier != (cast_expression "(SessionTable *)0x0" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39);" (assignment_expression "pSVar4 = (SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39)" identifier = (cast_expression "(SessionTable *)sqlite3_malloc64((long)iVar2 + 0x39)" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_malloc64((long)iVar2 + 0x39)" identifier (argument_list "((long)iVar2 + 0x39)" ( (binary_expression "(long)iVar2 + 0x39" (cast_expression "(long)iVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" identifier = number_literal) ;) (if_statement "if (pSVar4 != (SessionTable *)0x0) {\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }" if (parenthesized_expression "(pSVar4 != (SessionTable *)0x0)" ( (binary_expression "pSVar4 != (SessionTable *)0x0" identifier != (cast_expression "(SessionTable *)0x0" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pSVar4->pNext = (SessionTable *)0x0;\n      pSVar4->nCol = 0;\n      pSVar4->bStat1 = 0;\n      pSVar4->azCol = (char **)0x0;\n      pSVar4->abPK = (u8 *)0x0;\n      pSVar4->nEntry = 0;\n      pSVar4->nChange = 0;\n      pSVar4->apChange = (SessionChange **)0x0;\n      pSVar4->zName = (char *)(pSVar4 + 1);\n      memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));\n      pSVar1 = pSession->pTable;\n      if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }\n      pSVar5->pNext = pSVar4;\n      iVar3 = 0;\n    }" { (expression_statement "pSVar4->pNext = (SessionTable *)0x0;" (assignment_expression "pSVar4->pNext = (SessionTable *)0x0" (field_expression "pSVar4->pNext" identifier -> field_identifier) = (cast_expression "(SessionTable *)0x0" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pSVar4->nCol = 0;" (assignment_expression "pSVar4->nCol = 0" (field_expression "pSVar4->nCol" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar4->bStat1 = 0;" (assignment_expression "pSVar4->bStat1 = 0" (field_expression "pSVar4->bStat1" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar4->azCol = (char **)0x0;" (assignment_expression "pSVar4->azCol = (char **)0x0" (field_expression "pSVar4->azCol" identifier -> field_identifier) = (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) ;) (expression_statement "pSVar4->abPK = (u8 *)0x0;" (assignment_expression "pSVar4->abPK = (u8 *)0x0" (field_expression "pSVar4->abPK" identifier -> field_identifier) = (cast_expression "(u8 *)0x0" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pSVar4->nEntry = 0;" (assignment_expression "pSVar4->nEntry = 0" (field_expression "pSVar4->nEntry" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar4->nChange = 0;" (assignment_expression "pSVar4->nChange = 0" (field_expression "pSVar4->nChange" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar4->apChange = (SessionChange **)0x0;" (assignment_expression "pSVar4->apChange = (SessionChange **)0x0" (field_expression "pSVar4->apChange" identifier -> field_identifier) = (cast_expression "(SessionChange **)0x0" ( (type_descriptor "SessionChange **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) ;) (expression_statement "pSVar4->zName = (char *)(pSVar4 + 1);" (assignment_expression "pSVar4->zName = (char *)(pSVar4 + 1)" (field_expression "pSVar4->zName" identifier -> field_identifier) = (cast_expression "(char *)(pSVar4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pSVar4 + 1)" ( (binary_expression "pSVar4 + 1" identifier + number_literal) )))) ;) (expression_statement "memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1));" (call_expression "memcpy(pSVar4 + 1,zName,(long)(iVar2 + 1))" identifier (argument_list "(pSVar4 + 1,zName,(long)(iVar2 + 1))" ( (binary_expression "pSVar4 + 1" identifier + number_literal) , identifier , (cast_expression "(long)(iVar2 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar2 + 1)" ( (binary_expression "iVar2 + 1" identifier + number_literal) ))) ))) ;) (expression_statement "pSVar1 = pSession->pTable;" (assignment_expression "pSVar1 = pSession->pTable" identifier = (field_expression "pSession->pTable" identifier -> field_identifier)) ;) (if_statement "if (pSession->pTable == (SessionTable *)0x0) {\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }\n      else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }" if (parenthesized_expression "(pSession->pTable == (SessionTable *)0x0)" ( (binary_expression "pSession->pTable == (SessionTable *)0x0" (field_expression "pSession->pTable" identifier -> field_identifier) == (cast_expression "(SessionTable *)0x0" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        pSVar5 = (SessionTable *)&pSession->pTable;\n      }" { (expression_statement "pSVar5 = (SessionTable *)&pSession->pTable;" (assignment_expression "pSVar5 = (SessionTable *)&pSession->pTable" identifier = (cast_expression "(SessionTable *)&pSession->pTable" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pSession->pTable" & (field_expression "pSession->pTable" identifier -> field_identifier)))) ;) }) (else_clause "else {\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }" else (compound_statement "{\n        do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);\n      }" { (do_statement "do {\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        } while (pSVar5->pNext != (SessionTable *)0x0);" do (compound_statement "{\n          pSVar5 = pSVar1;\n          pSVar1 = pSVar5->pNext;\n        }" { (expression_statement "pSVar5 = pSVar1;" (assignment_expression "pSVar5 = pSVar1" identifier = identifier) ;) (expression_statement "pSVar1 = pSVar5->pNext;" (assignment_expression "pSVar1 = pSVar5->pNext" identifier = (field_expression "pSVar5->pNext" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pSVar5->pNext != (SessionTable *)0x0)" ( (binary_expression "pSVar5->pNext != (SessionTable *)0x0" (field_expression "pSVar5->pNext" identifier -> field_identifier) != (cast_expression "(SessionTable *)0x0" ( (type_descriptor "SessionTable *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (expression_statement "pSVar5->pNext = pSVar4;" (assignment_expression "pSVar5->pNext = pSVar4" (field_expression "pSVar5->pNext" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) })) }))) (labeled_statement "LAB_001e8666:\n  sqlite3_mutex_leave(pSession->db->mutex);" statement_identifier : (expression_statement "sqlite3_mutex_leave(pSession->db->mutex);" (call_expression "sqlite3_mutex_leave(pSession->db->mutex)" identifier (argument_list "(pSession->db->mutex)" ( (field_expression "pSession->db->mutex" (field_expression "pSession->db" identifier -> field_identifier) -> field_identifier) ))) ;)) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "int FUN_001e8589(long *param_1,void *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}\n\n" (function_definition "int FUN_001e8589(long *param_1,void *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}" primitive_type (function_declarator "FUN_001e8589(long *param_1,void *param_2)" identifier (parameter_list "(long *param_1,void *param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "long *plVar4;" (sized_type_specifier "long" long) (pointer_declarator "*plVar4" * identifier) ;) (declaration "long *plVar5;" (sized_type_specifier "long" long) (pointer_declarator "*plVar5" * identifier) ;) (expression_statement "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (if_statement "if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" if (parenthesized_expression "(param_2 == (void *)0x0)" ( (binary_expression "param_2 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 3) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 3) = 1" (pointer_expression "*(undefined4 *)(param_1 + 3)" * (cast_expression "(undefined4 *)(param_1 + 3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 3)" ( (binary_expression "param_1 + 3" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" else (compound_statement "{\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" { (expression_statement "iVar1 = FUN_00139edc(param_2);" (assignment_expression "iVar1 = FUN_00139edc(param_2)" identifier = (call_expression "FUN_00139edc(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "plVar5 = (long *)param_1[8];" (assignment_expression "plVar5 = (long *)param_1[8]" identifier = (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ]))) ;) (if_statement "if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }" if (parenthesized_expression "(plVar5 != (long *)0x0)" ( (binary_expression "plVar5 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }" { (do_statement "do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);" do (compound_statement "{\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      }" { (expression_statement "iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);" (assignment_expression "iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1)" identifier = (call_expression "FUN_0012ada6(plVar5[1],param_2,iVar1 + 1)" identifier (argument_list "(plVar5[1],param_2,iVar1 + 1)" ( (subscript_expression "plVar5[1]" identifier [ number_literal ]) , identifier , (binary_expression "iVar1 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) goto LAB_001e8666;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001e8666;" goto statement_identifier ;)) (expression_statement "plVar5 = (long *)*plVar5;" (assignment_expression "plVar5 = (long *)*plVar5" identifier = (cast_expression "(long *)*plVar5" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*plVar5" * identifier))) ;) }) while (parenthesized_expression "(plVar5 != (long *)0x0)" ( (binary_expression "plVar5 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);" (assignment_expression "puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39)" identifier = (cast_expression "(undefined8 *)FUN_0014bbac((long)iVar1 + 0x39)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0014bbac((long)iVar1 + 0x39)" identifier (argument_list "((long)iVar1 + 0x39)" ( (binary_expression "(long)iVar1 + 0x39" (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = 7;" (assignment_expression "iVar2 = 7" identifier = number_literal) ;) (if_statement "if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }" if (parenthesized_expression "(puVar3 != (undefined8 *)0x0)" ( (binary_expression "puVar3 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }" { (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3[2] = 0;" (assignment_expression "puVar3[2] = 0" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[3] = 0;" (assignment_expression "puVar3[3] = 0" (subscript_expression "puVar3[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[4] = 0;" (assignment_expression "puVar3[4] = 0" (subscript_expression "puVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[5] = 0;" (assignment_expression "puVar3[5] = 0" (subscript_expression "puVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[6] = 0;" (assignment_expression "puVar3[6] = 0" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[1] = puVar3 + 7;" (assignment_expression "puVar3[1] = puVar3 + 7" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = (binary_expression "puVar3 + 7" identifier + number_literal)) ;) (expression_statement "memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));" (call_expression "memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1))" identifier (argument_list "(puVar3 + 7,param_2,(long)(iVar1 + 1))" ( (binary_expression "puVar3 + 7" identifier + number_literal) , identifier , (cast_expression "(long)(iVar1 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) ))) ))) ;) (expression_statement "plVar5 = (long *)param_1[8];" (assignment_expression "plVar5 = (long *)param_1[8]" identifier = (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ]))) ;) (if_statement "if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" if (parenthesized_expression "((long *)param_1[8] == (long *)0x0)" ( (binary_expression "(long *)param_1[8] == (long *)0x0" (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ])) == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        plVar4 = param_1 + 8;\n      }" { (expression_statement "plVar4 = param_1 + 8;" (assignment_expression "plVar4 = param_1 + 8" identifier = (binary_expression "param_1 + 8" identifier + number_literal)) ;) }) (else_clause "else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" else (compound_statement "{\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" { (do_statement "do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);" do (compound_statement "{\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        }" { (expression_statement "plVar4 = plVar5;" (assignment_expression "plVar4 = plVar5" identifier = identifier) ;) (expression_statement "plVar5 = (long *)*plVar4;" (assignment_expression "plVar5 = (long *)*plVar4" identifier = (cast_expression "(long *)*plVar4" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*plVar4" * identifier))) ;) }) while (parenthesized_expression "((long *)*plVar4 != (long *)0x0)" ( (binary_expression "(long *)*plVar4 != (long *)0x0" (cast_expression "(long *)*plVar4" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*plVar4" * identifier)) != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) }))) (expression_statement "*plVar4 = (long)puVar3;" (assignment_expression "*plVar4 = (long)puVar3" (pointer_expression "*plVar4" * identifier) = (cast_expression "(long)puVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) })) }))) (labeled_statement "LAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" statement_identifier : (expression_statement "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;)) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) == (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }) while (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;)) (return_statement return IDENT ;) })))
(function_definition "int FUN_001e8589(long *param_1,void *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}" (primitive_type "int") (function_declarator "FUN_001e8589(long *param_1,void *param_2)" (identifier "FUN_001e8589") (parameter_list "(long *param_1,void *param_2)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined8 *puVar3;\n  long *plVar4;\n  long *plVar5;\n  \n  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n  if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }\nLAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n  return iVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined8 *puVar3;" (type_identifier "undefined8") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "long *plVar4;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar4" (* "*") (identifier "plVar4")) (; ";")) (declaration "long *plVar5;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar5" (* "*") (identifier "plVar5")) (; ";")) (expression_statement "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18))" (identifier "FUN_0012a8c7") (argument_list "(*(undefined8 *)(*param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(*param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x18)" (( "(") (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (if_statement "if (param_2 == (void *)0x0) {\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }\n  else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == (void *)0x0)" (( "(") (binary_expression "param_2 == (void *)0x0" (identifier "param_2") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 3) = 1;\n    iVar2 = 0;\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 3) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 3) = 1" (pointer_expression "*(undefined4 *)(param_1 + 3)" (* "*") (cast_expression "(undefined4 *)(param_1 + 3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 3)" (( "(") (binary_expression "param_1 + 3" (identifier "param_1") (+ "+") (number_literal "3")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" (else "else") (compound_statement "{\n    iVar1 = FUN_00139edc(param_2);\n    plVar5 = (long *)param_1[8];\n    if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }\n    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);\n    iVar2 = 7;\n    if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }\n  }" ({ "{") (expression_statement "iVar1 = FUN_00139edc(param_2);" (assignment_expression "iVar1 = FUN_00139edc(param_2)" (identifier "iVar1") (= "=") (call_expression "FUN_00139edc(param_2)" (identifier "FUN_00139edc") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "plVar5 = (long *)param_1[8];" (assignment_expression "plVar5 = (long *)param_1[8]" (identifier "plVar5") (= "=") (cast_expression "(long *)param_1[8]" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")))) (; ";")) (if_statement "if (plVar5 != (long *)0x0) {\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }" (if "if") (parenthesized_expression "(plVar5 != (long *)0x0)" (( "(") (binary_expression "plVar5 != (long *)0x0" (identifier "plVar5") (!= "!=") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);\n    }" ({ "{") (do_statement "do {\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      } while (plVar5 != (long *)0x0);" (do "do") (compound_statement "{\n        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);\n        if (iVar2 == 0) goto LAB_001e8666;\n        plVar5 = (long *)*plVar5;\n      }" ({ "{") (expression_statement "iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);" (assignment_expression "iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1)" (identifier "iVar2") (= "=") (call_expression "FUN_0012ada6(plVar5[1],param_2,iVar1 + 1)" (identifier "FUN_0012ada6") (argument_list "(plVar5[1],param_2,iVar1 + 1)" (( "(") (subscript_expression "plVar5[1]" (identifier "plVar5") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "param_2") (, ",") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) goto LAB_001e8666;" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_001e8666;" (goto "goto") (statement_identifier "LAB_001e8666") (; ";"))) (expression_statement "plVar5 = (long *)*plVar5;" (assignment_expression "plVar5 = (long *)*plVar5" (identifier "plVar5") (= "=") (cast_expression "(long *)*plVar5" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*plVar5" (* "*") (identifier "plVar5")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(plVar5 != (long *)0x0)" (( "(") (binary_expression "plVar5 != (long *)0x0" (identifier "plVar5") (!= "!=") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (expression_statement "puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);" (assignment_expression "puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39)" (identifier "puVar3") (= "=") (cast_expression "(undefined8 *)FUN_0014bbac((long)iVar1 + 0x39)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0014bbac((long)iVar1 + 0x39)" (identifier "FUN_0014bbac") (argument_list "((long)iVar1 + 0x39)" (( "(") (binary_expression "(long)iVar1 + 0x39" (cast_expression "(long)iVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar1")) (+ "+") (number_literal "0x39")) () ")"))))) (; ";")) (expression_statement "iVar2 = 7;" (assignment_expression "iVar2 = 7" (identifier "iVar2") (= "=") (number_literal "7")) (; ";")) (if_statement "if (puVar3 != (undefined8 *)0x0) {\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }" (if "if") (parenthesized_expression "(puVar3 != (undefined8 *)0x0)" (( "(") (binary_expression "puVar3 != (undefined8 *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *puVar3 = 0;\n      puVar3[2] = 0;\n      puVar3[3] = 0;\n      puVar3[4] = 0;\n      puVar3[5] = 0;\n      puVar3[6] = 0;\n      puVar3[1] = puVar3 + 7;\n      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));\n      plVar5 = (long *)param_1[8];\n      if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }\n      *plVar4 = (long)puVar3;\n      iVar2 = 0;\n    }" ({ "{") (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[2] = 0;" (assignment_expression "puVar3[2] = 0" (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[3] = 0;" (assignment_expression "puVar3[3] = 0" (subscript_expression "puVar3[3]" (identifier "puVar3") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[4] = 0;" (assignment_expression "puVar3[4] = 0" (subscript_expression "puVar3[4]" (identifier "puVar3") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[5] = 0;" (assignment_expression "puVar3[5] = 0" (subscript_expression "puVar3[5]" (identifier "puVar3") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[6] = 0;" (assignment_expression "puVar3[6] = 0" (subscript_expression "puVar3[6]" (identifier "puVar3") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[1] = puVar3 + 7;" (assignment_expression "puVar3[1] = puVar3 + 7" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "puVar3 + 7" (identifier "puVar3") (+ "+") (number_literal "7"))) (; ";")) (expression_statement "memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));" (call_expression "memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1))" (identifier "memcpy") (argument_list "(puVar3 + 7,param_2,(long)(iVar1 + 1))" (( "(") (binary_expression "puVar3 + 7" (identifier "puVar3") (+ "+") (number_literal "7")) (, ",") (identifier "param_2") (, ",") (cast_expression "(long)(iVar1 + 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(iVar1 + 1)" (( "(") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) () ")"))) () ")"))) (; ";")) (expression_statement "plVar5 = (long *)param_1[8];" (assignment_expression "plVar5 = (long *)param_1[8]" (identifier "plVar5") (= "=") (cast_expression "(long *)param_1[8]" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")))) (; ";")) (if_statement "if ((long *)param_1[8] == (long *)0x0) {\n        plVar4 = param_1 + 8;\n      }\n      else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" (if "if") (parenthesized_expression "((long *)param_1[8] == (long *)0x0)" (( "(") (binary_expression "(long *)param_1[8] == (long *)0x0" (cast_expression "(long *)param_1[8]" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]"))) (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        plVar4 = param_1 + 8;\n      }" ({ "{") (expression_statement "plVar4 = param_1 + 8;" (assignment_expression "plVar4 = param_1 + 8" (identifier "plVar4") (= "=") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8"))) (; ";")) (} "}")) (else_clause "else {\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" (else "else") (compound_statement "{\n        do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);\n      }" ({ "{") (do_statement "do {\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        } while ((long *)*plVar4 != (long *)0x0);" (do "do") (compound_statement "{\n          plVar4 = plVar5;\n          plVar5 = (long *)*plVar4;\n        }" ({ "{") (expression_statement "plVar4 = plVar5;" (assignment_expression "plVar4 = plVar5" (identifier "plVar4") (= "=") (identifier "plVar5")) (; ";")) (expression_statement "plVar5 = (long *)*plVar4;" (assignment_expression "plVar5 = (long *)*plVar4" (identifier "plVar5") (= "=") (cast_expression "(long *)*plVar4" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*plVar4" (* "*") (identifier "plVar4")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((long *)*plVar4 != (long *)0x0)" (( "(") (binary_expression "(long *)*plVar4 != (long *)0x0" (cast_expression "(long *)*plVar4" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*plVar4" (* "*") (identifier "plVar4"))) (!= "!=") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}")))) (expression_statement "*plVar4 = (long)puVar3;" (assignment_expression "*plVar4 = (long)puVar3" (pointer_expression "*plVar4" (* "*") (identifier "plVar4")) (= "=") (cast_expression "(long)puVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar3"))) (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")))) (labeled_statement "LAB_001e8666:\n  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" (statement_identifier "LAB_001e8666") (: ":") (expression_statement "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18))" (identifier "FUN_0012a8f6") (argument_list "(*(undefined8 *)(*param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(*param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x18)" (( "(") (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

int function_1(type_1 *pSession,char *var_2)

{
  type_2 *pSVar1;
  int var_6;
  int var_7;
  type_2 *var_4;
  type_2 *pSVar5;
  
  var_1(pSession->db->mutex);
  if (var_2 == (char *)0x0) {
    pSession->bAutoAttach = 1;
    var_7 = 0;
  }
  else {
    var_6 = var_3(var_2);
    var_4 = pSession->pTable;
    if (var_4 != (type_2 *)0x0) {
      do {
        var_7 = var_5(var_4->var_2,var_2,var_6 + 1);
        if (var_7 == 0) goto LAB_001e8666;
        var_4 = var_4->pNext;
      } while (var_4 != (type_2 *)0x0);
    }
    var_4 = (type_2 *)var_8((long)var_6 + 0x39);
    var_7 = 7;
    if (var_4 != (type_2 *)0x0) {
      var_4->pNext = (type_2 *)0x0;
      var_4->nCol = 0;
      var_4->bStat1 = 0;
      var_4->azCol = (char **)0x0;
      var_4->abPK = (type_3 *)0x0;
      var_4->nEntry = 0;
      var_4->nChange = 0;
      var_4->apChange = (type_4 **)0x0;
      var_4->var_2 = (char *)(var_4 + 1);
      var_9(var_4 + 1,var_2,(long)(var_6 + 1));
      pSVar1 = pSession->pTable;
      if (pSession->pTable == (type_2 *)0x0) {
        pSVar5 = (type_2 *)&pSession->pTable;
      }
      else {
        do {
          pSVar5 = pSVar1;
          pSVar1 = pSVar5->pNext;
        } while (pSVar5->pNext != (type_2 *)0x0);
      }
      pSVar5->pNext = var_4;
      var_7 = 0;
    }
  }
LAB_001e8666:
  var_10(pSession->db->mutex);
  return var_7;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))))) (return_statement (identifier)))))

int MASKED(long *param_1,void *param_2)

{
  int iVar1;
  int iVar2;
  undefined8 *puVar3;
  long *plVar4;
  long *plVar5;
  
  FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));
  if (param_2 == (void *)0x0) {
    *(undefined4 *)(param_1 + 3) = 1;
    iVar2 = 0;
  }
  else {
    iVar1 = FUN_00139edc(param_2);
    plVar5 = (long *)param_1[8];
    if (plVar5 != (long *)0x0) {
      do {
        iVar2 = FUN_0012ada6(plVar5[1],param_2,iVar1 + 1);
        if (iVar2 == 0) goto LAB_001e8666;
        plVar5 = (long *)*plVar5;
      } while (plVar5 != (long *)0x0);
    }
    puVar3 = (undefined8 *)FUN_0014bbac((long)iVar1 + 0x39);
    iVar2 = 7;
    if (puVar3 != (undefined8 *)0x0) {
      *puVar3 = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      puVar3[4] = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[1] = puVar3 + 7;
      memcpy(puVar3 + 7,param_2,(long)(iVar1 + 1));
      plVar5 = (long *)param_1[8];
      if ((long *)param_1[8] == (long *)0x0) {
        plVar4 = param_1 + 8;
      }
      else {
        do {
          plVar4 = plVar5;
          plVar5 = (long *)*plVar4;
        } while ((long *)*plVar4 != (long *)0x0);
      }
      *plVar4 = (long)puVar3;
      iVar2 = 0;
    }
  }
LAB_001e8666:
  FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));
  return iVar2;
}

