
int renameEditSql(sqlite3_context *pCtx,RenameCtx *pRename,char *zSql,char *zNew,int bQuote)

{
  uint uVar1;
  RenameToken *pRVar2;
  byte *pbVar3;
  uint uVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  sqlite3 *db;
  char *z;
  char *z_00;
  RenameCtx *pRVar8;
  RenameToken *pRVar9;
  RenameToken *p;
  int iVar10;
  char *__src;
  
  uVar4 = sqlite3Strlen30(zNew);
  iVar5 = sqlite3Strlen30(zSql);
  db = sqlite3_context_db_handle(pCtx);
  z = sqlite3MPrintf(db,"\"%w\"",zNew);
  if (z == (char *)0x0) {
    iVar10 = 7;
  }
  else {
    uVar6 = sqlite3Strlen30(z);
    if (bQuote != 0) {
      zNew = z;
      uVar4 = uVar6;
    }
    z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));
    iVar10 = 7;
    if (z_00 != (char *)0x0) {
      memcpy(z_00,zSql,(long)iVar5);
      pRVar2 = pRename->pList;
      while (pRVar2 != (RenameToken *)0x0) {
        pRVar9 = pRVar2->pNext;
        pRVar8 = pRename;
        p = pRVar2;
        if (pRVar9 != (RenameToken *)0x0) {
          do {
            if ((p->t).z < (pRVar9->t).z) {
              p = pRVar9;
            }
            pRVar9 = pRVar9->pNext;
          } while (pRVar9 != (RenameToken *)0x0);
          if (p != pRVar2) {
            do {
              pRVar9 = pRVar2;
              pRVar2 = pRVar9->pNext;
            } while (pRVar2 != p);
            pRVar8 = (RenameCtx *)&pRVar9->pNext;
          }
        }
        pRVar8->pList = p->pNext;
        pbVar3 = (byte *)(p->t).z;
        __src = z;
        uVar1 = uVar6;
        if ((""[*pbVar3] & 0x46) != 0) {
          __src = zNew;
          uVar1 = uVar4;
        }
        iVar10 = (int)pbVar3 - (int)zSql;
        uVar7 = (p->t).n;
        if (uVar7 != uVar1) {
          uVar7 = uVar7 + iVar10;
          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));
          iVar5 = (iVar5 - (p->t).n) + uVar1;
          z_00[iVar5] = '\0';
        }
        memcpy(z_00 + iVar10,__src,(ulong)uVar1);
        sqlite3DbFree(db,p);
        pRVar2 = pRename->pList;
      }
      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);
      sqlite3DbFree(db,z_00);
      iVar10 = 0;
    }
    sqlite3_free(z);
  }
  return iVar10;
}



undefined8 FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)

{
  uint uVar1;
  long lVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  undefined8 uVar7;
  void *pvVar8;
  void *__dest;
  long *plVar9;
  long lVar10;
  undefined8 uVar11;
  long lVar12;
  int iVar13;
  void *__src;
  
  uVar3 = FUN_0011572f(param_4);
  iVar4 = FUN_0011572f(param_3);
  uVar7 = sqlite3_context_db_handle(param_1);
  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);
  if (pvVar8 == (void *)0x0) {
    uVar11 = 7;
  }
  else {
    uVar5 = FUN_0011572f(pvVar8);
    if (param_5 != 0) {
      param_4 = pvVar8;
      uVar3 = uVar5;
    }
    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));
    uVar11 = 7;
    if (__dest != (void *)0x0) {
      memcpy(__dest,param_3,(long)iVar4);
      lVar2 = *param_2;
      while (lVar2 != 0) {
        lVar10 = *(long *)(lVar2 + 0x18);
        plVar9 = param_2;
        lVar12 = lVar2;
        if (lVar10 != 0) {
          do {
            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {
              lVar12 = lVar10;
            }
            lVar10 = *(long *)(lVar10 + 0x18);
          } while (lVar10 != 0);
          if (lVar12 != lVar2) {
            do {
              lVar10 = lVar2;
              lVar2 = *(long *)(lVar10 + 0x18);
            } while (lVar2 != lVar12);
            plVar9 = (long *)(lVar10 + 0x18);
          }
        }
        *plVar9 = *(long *)(lVar12 + 0x18);
        __src = pvVar8;
        uVar1 = uVar5;
        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {
          __src = param_4;
          uVar1 = uVar3;
        }
        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;
        if (*(uint *)(lVar12 + 0x10) != uVar1) {
          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;
          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),
                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));
          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;
          *(undefined1 *)((long)__dest + (long)iVar4) = 0;
        }
        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);
        FUN_00119825(uVar7,lVar12);
        lVar2 = *param_2;
      }
      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);
      FUN_00119825(uVar7,__dest);
      uVar11 = 0;
    }
    sqlite3_free(pvVar8);
  }
  return uVar11;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV R12,RDX
MOV qword ptr [RSP + 0x18],RDX
MOV R15,RCX
MOV EBX,R8D
MOV RDI,RCX
CALL 0x0011572f
MOV dword ptr [RSP + 0x28],EAX
MOV RDI,R12
CALL 0x0011572f
MOV R13D,EAX
MOV RDI,R14
CALL 0x0010c4b0
MOV RBP,RAX
MOV qword ptr [RSP + 0x10],RAX
MOV RDX,R15
LEA RSI,[0x18f082]
MOV RDI,RAX
MOV EAX,0x0
CALL 0x00130001
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x00130332
MOV R14,RAX
MOV RDI,RAX
CALL 0x0011572f
MOV dword ptr [RSP + 0x2c],EAX
TEST EBX,EBX
MOV ECX,dword ptr [RSP + 0x28]
CMOVNZ ECX,EAX
MOV dword ptr [RSP + 0x28],ECX
CMOVNZ R15,R14
MOV RSI,qword ptr [RSP + 0x8]
IMUL EAX,dword ptr [RSI + 0x8]
LEA ESI,[R13 + RAX*0x1 + 0x1]
MOVSXD RSI,ESI
MOV RDI,RBP
CALL 0x001225e4
MOV R14,RAX
MOV EBX,0x7
TEST RAX,RAX
JZ 0x00130317
MOVSXD RDX,R13D
MOV RSI,R12
MOV RDI,RAX
CALL 0x0010c310
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x001302ec
MOV qword ptr [RSP + 0x30],R15
JMP 0x0013027b
MOV RDX,RAX
MOV RAX,qword ptr [RDX + 0x18]
CMP RAX,RBX
JNZ 0x0013020d
LEA RAX,[RDX + 0x18]
MOV RDX,qword ptr [RBX + 0x18]
MOV qword ptr [RAX],RDX
MOV RBP,qword ptr [RBX + 0x8]
MOVZX EAX,byte ptr [RBP]
LEA RSI,[0x196400]
TEST byte ptr [RSI + RAX*0x1],0x46
JZ 0x001302b3
MOV R12D,dword ptr [RSP + 0x28]
MOV R15,qword ptr [RSP + 0x30]
SUB RBP,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RBX + 0x10]
CMP EAX,R12D
JNZ 0x001302bf
MOVSXD RDI,EBP
ADD RDI,R14
MOV EDX,R12D
MOV RSI,R15
CALL 0x0010c310
MOV RSI,RBX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00119825
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RAX]
TEST RDX,RDX
JZ 0x001302ec
MOV RAX,qword ptr [RDX + 0x18]
TEST RAX,RAX
JZ 0x00130339
MOV RBX,RDX
MOV RCX,qword ptr [RAX + 0x8]
CMP RCX,qword ptr [RBX + 0x8]
CMOVA RBX,RAX
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JNZ 0x0013028b
CMP RBX,RDX
JNZ 0x00130210
MOV RAX,qword ptr [RSP + 0x8]
JMP 0x0013021d
MOV R12D,dword ptr [RSP + 0x2c]
MOV R15,qword ptr [RSP + 0x20]
JMP 0x00130243
ADD EAX,EBP
MOV EDX,R13D
SUB EDX,EAX
MOV EAX,EAX
LEA RSI,[R14 + RAX*0x1]
LEA EDI,[R12 + RBP*0x1]
ADD RDI,R14
CALL 0x0010c580
SUB R13D,dword ptr [RBX + 0x10]
ADD R13D,R12D
MOVSXD RAX,R13D
MOV byte ptr [R14 + RAX*0x1],0x0
JMP 0x00130250
MOV RCX,-0x1
MOV EDX,0xffffffff
MOV RSI,R14
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0010c060
MOV RSI,R14
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00119825
MOV EBX,0x0
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0010c8d0
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV EBX,0x7
JMP 0x00130321
MOV RAX,qword ptr [RSP + 0x8]
MOV RBX,RDX
JMP 0x0013021d
(translation_unit "undefined8 FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}\n\n" (function_definition "undefined8 FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}" type_identifier (function_declarator "FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)" identifier (parameter_list "(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "void *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "void *pvVar8;" primitive_type (pointer_declarator "*pvVar8" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "long *plVar9;" (sized_type_specifier "long" long) (pointer_declarator "*plVar9" * identifier) ;) (declaration "long lVar10;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar11;" type_identifier identifier ;) (declaration "long lVar12;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar13;" primitive_type identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (expression_statement "uVar3 = FUN_0011572f(param_4);" (assignment_expression "uVar3 = FUN_0011572f(param_4)" identifier = (call_expression "FUN_0011572f(param_4)" identifier (argument_list "(param_4)" ( identifier )))) ;) (expression_statement "iVar4 = FUN_0011572f(param_3);" (assignment_expression "iVar4 = FUN_0011572f(param_3)" identifier = (call_expression "FUN_0011572f(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "uVar7 = sqlite3_context_db_handle(param_1);" (assignment_expression "uVar7 = sqlite3_context_db_handle(param_1)" identifier = (call_expression "sqlite3_context_db_handle(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);" (assignment_expression "pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4)" identifier = (cast_expression "(void *)FUN_00130001(uVar7,&DAT_0018f082,param_4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00130001(uVar7,&DAT_0018f082,param_4)" identifier (argument_list "(uVar7,&DAT_0018f082,param_4)" ( identifier , (pointer_expression "&DAT_0018f082" & identifier) , identifier ))))) ;) (if_statement "if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" if (parenthesized_expression "(pvVar8 == (void *)0x0)" ( (binary_expression "pvVar8 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar11 = 7;\n  }" { (expression_statement "uVar11 = 7;" (assignment_expression "uVar11 = 7" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" else (compound_statement "{\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" { (expression_statement "uVar5 = FUN_0011572f(pvVar8);" (assignment_expression "uVar5 = FUN_0011572f(pvVar8)" identifier = (call_expression "FUN_0011572f(pvVar8)" identifier (argument_list "(pvVar8)" ( identifier )))) ;) (if_statement "if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }" { (expression_statement "param_4 = pvVar8;" (assignment_expression "param_4 = pvVar8" identifier = identifier) ;) (expression_statement "uVar3 = uVar5;" (assignment_expression "uVar3 = uVar5" identifier = identifier) ;) })) (expression_statement "__dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));" (assignment_expression "__dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" identifier = (cast_expression "(void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" identifier (argument_list "(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" ( identifier , (cast_expression "(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1])" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(iVar4 + 1 + uVar5 * (int)param_2[1])" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(iVar4 + 1 + uVar5 * (int)param_2[1])" ( (binary_expression "iVar4 + 1 + uVar5 * (int)param_2[1]" (binary_expression "iVar4 + 1" identifier + number_literal) + (binary_expression "uVar5 * (int)param_2[1]" identifier * (cast_expression "(int)param_2[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])))) )))) ))))) ;) (expression_statement "uVar11 = 7;" (assignment_expression "uVar11 = 7" identifier = number_literal) ;) (if_statement "if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }" { (expression_statement "memcpy(__dest,param_3,(long)iVar4);" (call_expression "memcpy(__dest,param_3,(long)iVar4)" identifier (argument_list "(__dest,param_3,(long)iVar4)" ( identifier , identifier , (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "lVar2 = *param_2;" (assignment_expression "lVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (while_statement "while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }" while (parenthesized_expression "(lVar2 != 0)" ( (binary_expression "lVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }" { (expression_statement "lVar10 = *(long *)(lVar2 + 0x18);" (assignment_expression "lVar10 = *(long *)(lVar2 + 0x18)" identifier = (pointer_expression "*(long *)(lVar2 + 0x18)" * (cast_expression "(long *)(lVar2 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x18)" ( (binary_expression "lVar2 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "plVar9 = param_2;" (assignment_expression "plVar9 = param_2" identifier = identifier) ;) (expression_statement "lVar12 = lVar2;" (assignment_expression "lVar12 = lVar2" identifier = identifier) ;) (if_statement "if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }" if (parenthesized_expression "(lVar10 != 0)" ( (binary_expression "lVar10 != 0" identifier != number_literal) )) (compound_statement "{\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }" { (do_statement "do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);" do (compound_statement "{\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          }" { (if_statement "if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }" if (parenthesized_expression "(*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8))" ( (binary_expression "*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)" (pointer_expression "*(ulong *)(lVar12 + 8)" * (cast_expression "(ulong *)(lVar12 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 8)" ( (binary_expression "lVar12 + 8" identifier + number_literal) )))) < (pointer_expression "*(ulong *)(lVar10 + 8)" * (cast_expression "(ulong *)(lVar10 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 8)" ( (binary_expression "lVar10 + 8" identifier + number_literal) ))))) )) (compound_statement "{\n              lVar12 = lVar10;\n            }" { (expression_statement "lVar12 = lVar10;" (assignment_expression "lVar12 = lVar10" identifier = identifier) ;) })) (expression_statement "lVar10 = *(long *)(lVar10 + 0x18);" (assignment_expression "lVar10 = *(long *)(lVar10 + 0x18)" identifier = (pointer_expression "*(long *)(lVar10 + 0x18)" * (cast_expression "(long *)(lVar10 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 0x18)" ( (binary_expression "lVar10 + 0x18" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(lVar10 != 0)" ( (binary_expression "lVar10 != 0" identifier != number_literal) )) ;) (if_statement "if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }" if (parenthesized_expression "(lVar12 != lVar2)" ( (binary_expression "lVar12 != lVar2" identifier != identifier) )) (compound_statement "{\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }" { (do_statement "do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);" do (compound_statement "{\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            }" { (expression_statement "lVar10 = lVar2;" (assignment_expression "lVar10 = lVar2" identifier = identifier) ;) (expression_statement "lVar2 = *(long *)(lVar10 + 0x18);" (assignment_expression "lVar2 = *(long *)(lVar10 + 0x18)" identifier = (pointer_expression "*(long *)(lVar10 + 0x18)" * (cast_expression "(long *)(lVar10 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 0x18)" ( (binary_expression "lVar10 + 0x18" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(lVar2 != lVar12)" ( (binary_expression "lVar2 != lVar12" identifier != identifier) )) ;) (expression_statement "plVar9 = (long *)(lVar10 + 0x18);" (assignment_expression "plVar9 = (long *)(lVar10 + 0x18)" identifier = (cast_expression "(long *)(lVar10 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 0x18)" ( (binary_expression "lVar10 + 0x18" identifier + number_literal) )))) ;) })) })) (expression_statement "*plVar9 = *(long *)(lVar12 + 0x18);" (assignment_expression "*plVar9 = *(long *)(lVar12 + 0x18)" (pointer_expression "*plVar9" * identifier) = (pointer_expression "*(long *)(lVar12 + 0x18)" * (cast_expression "(long *)(lVar12 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x18)" ( (binary_expression "lVar12 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "__src = pvVar8;" (assignment_expression "__src = pvVar8" identifier = identifier) ;) (expression_statement "uVar1 = uVar5;" (assignment_expression "uVar1 = uVar5" identifier = identifier) ;) (if_statement "if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }" if (parenthesized_expression "(((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0)" ( (binary_expression "((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0" (parenthesized_expression "((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46)" ( (binary_expression "(&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46" (subscript_expression "(&DAT_00196400)[**(byte **)(lVar12 + 8)]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (pointer_expression "**(byte **)(lVar12 + 8)" * (pointer_expression "*(byte **)(lVar12 + 8)" * (cast_expression "(byte **)(lVar12 + 8)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar12 + 8)" ( (binary_expression "lVar12 + 8" identifier + number_literal) ))))) ]) & number_literal) )) != number_literal) )) (compound_statement "{\n          __src = param_4;\n          uVar1 = uVar3;\n        }" { (expression_statement "__src = param_4;" (assignment_expression "__src = param_4" identifier = identifier) ;) (expression_statement "uVar1 = uVar3;" (assignment_expression "uVar1 = uVar3" identifier = identifier) ;) })) (expression_statement "iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;" (assignment_expression "iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3" identifier = (binary_expression "(int)*(byte **)(lVar12 + 8) - (int)param_3" (cast_expression "(int)*(byte **)(lVar12 + 8)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(byte **)(lVar12 + 8)" * (cast_expression "(byte **)(lVar12 + 8)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar12 + 8)" ( (binary_expression "lVar12 + 8" identifier + number_literal) ))))) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }" if (parenthesized_expression "(*(uint *)(lVar12 + 0x10) != uVar1)" ( (binary_expression "*(uint *)(lVar12 + 0x10) != uVar1" (pointer_expression "*(uint *)(lVar12 + 0x10)" * (cast_expression "(uint *)(lVar12 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x10)" ( (binary_expression "lVar12 + 0x10" identifier + number_literal) )))) != identifier) )) (compound_statement "{\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }" { (expression_statement "uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;" (assignment_expression "uVar6 = *(uint *)(lVar12 + 0x10) + iVar13" identifier = (binary_expression "*(uint *)(lVar12 + 0x10) + iVar13" (pointer_expression "*(uint *)(lVar12 + 0x10)" * (cast_expression "(uint *)(lVar12 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x10)" ( (binary_expression "lVar12 + 0x10" identifier + number_literal) )))) + identifier)) ;) (expression_statement "memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));" (call_expression "memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6))" identifier (argument_list "((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6))" ( (cast_expression "(void *)((ulong)(uVar1 + iVar13) + (long)__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)(uVar1 + iVar13) + (long)__dest)" ( (binary_expression "(ulong)(uVar1 + iVar13) + (long)__dest" (call_expression "(ulong)(uVar1 + iVar13)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar1 + iVar13)" ( (binary_expression "uVar1 + iVar13" identifier + identifier) ))) + (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , (cast_expression "(void *)((long)__dest + (ulong)uVar6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)__dest + (ulong)uVar6)" ( (binary_expression "(long)__dest + (ulong)uVar6" (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ))) , (call_expression "(ulong)(iVar4 - uVar6)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar4 - uVar6)" ( (binary_expression "iVar4 - uVar6" identifier - identifier) ))) ))) ;) (expression_statement "iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;" (assignment_expression "iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1" identifier = (binary_expression "(iVar4 - *(int *)(lVar12 + 0x10)) + uVar1" (parenthesized_expression "(iVar4 - *(int *)(lVar12 + 0x10))" ( (binary_expression "iVar4 - *(int *)(lVar12 + 0x10)" identifier - (pointer_expression "*(int *)(lVar12 + 0x10)" * (cast_expression "(int *)(lVar12 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x10)" ( (binary_expression "lVar12 + 0x10" identifier + number_literal) ))))) )) + identifier)) ;) (expression_statement "*(undefined1 *)((long)__dest + (long)iVar4) = 0;" (assignment_expression "*(undefined1 *)((long)__dest + (long)iVar4) = 0" (pointer_expression "*(undefined1 *)((long)__dest + (long)iVar4)" * (cast_expression "(undefined1 *)((long)__dest + (long)iVar4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)__dest + (long)iVar4)" ( (binary_expression "(long)__dest + (long)iVar4" (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) = number_literal) ;) })) (expression_statement "memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);" (call_expression "memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1)" identifier (argument_list "((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1)" ( (cast_expression "(void *)((long)iVar13 + (long)__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)iVar13 + (long)__dest)" ( (binary_expression "(long)iVar13 + (long)__dest" (cast_expression "(long)iVar13" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , identifier , (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "FUN_00119825(uVar7,lVar12);" (call_expression "FUN_00119825(uVar7,lVar12)" identifier (argument_list "(uVar7,lVar12)" ( identifier , identifier ))) ;) (expression_statement "lVar2 = *param_2;" (assignment_expression "lVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (expression_statement "sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);" (call_expression "sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff)" identifier (argument_list "(param_1,__dest,0xffffffff,0xffffffffffffffff)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_00119825(uVar7,__dest);" (call_expression "FUN_00119825(uVar7,__dest)" identifier (argument_list "(uVar7,__dest)" ( identifier , identifier ))) ;) (expression_statement "uVar11 = 0;" (assignment_expression "uVar11 = 0" identifier = number_literal) ;) })) (expression_statement "sqlite3_free(pvVar8);" (call_expression "sqlite3_free(pvVar8)" identifier (argument_list "(pvVar8)" ( identifier ))) ;) }))) (return_statement "return uVar11;" return identifier ;) })))
(translation_unit "int renameEditSql(sqlite3_context *pCtx,RenameCtx *pRename,char *zSql,char *zNew,int bQuote)\n\n{\n  uint uVar1;\n  RenameToken *pRVar2;\n  byte *pbVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  uint uVar7;\n  sqlite3 *db;\n  char *z;\n  char *z_00;\n  RenameCtx *pRVar8;\n  RenameToken *pRVar9;\n  RenameToken *p;\n  int iVar10;\n  char *__src;\n  \n  uVar4 = sqlite3Strlen30(zNew);\n  iVar5 = sqlite3Strlen30(zSql);\n  db = sqlite3_context_db_handle(pCtx);\n  z = sqlite3MPrintf(db,"\"%w\"",zNew);\n  if (z == (char *)0x0) {\n    iVar10 = 7;\n  }\n  else {\n    uVar6 = sqlite3Strlen30(z);\n    if (bQuote != 0) {\n      zNew = z;\n      uVar4 = uVar6;\n    }\n    z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));\n    iVar10 = 7;\n    if (z_00 != (char *)0x0) {\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }\n    sqlite3_free(z);\n  }\n  return iVar10;\n}\n\n" (function_definition "int renameEditSql(sqlite3_context *pCtx,RenameCtx *pRename,char *zSql,char *zNew,int bQuote)\n\n{\n  uint uVar1;\n  RenameToken *pRVar2;\n  byte *pbVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  uint uVar7;\n  sqlite3 *db;\n  char *z;\n  char *z_00;\n  RenameCtx *pRVar8;\n  RenameToken *pRVar9;\n  RenameToken *p;\n  int iVar10;\n  char *__src;\n  \n  uVar4 = sqlite3Strlen30(zNew);\n  iVar5 = sqlite3Strlen30(zSql);\n  db = sqlite3_context_db_handle(pCtx);\n  z = sqlite3MPrintf(db,"\"%w\"",zNew);\n  if (z == (char *)0x0) {\n    iVar10 = 7;\n  }\n  else {\n    uVar6 = sqlite3Strlen30(z);\n    if (bQuote != 0) {\n      zNew = z;\n      uVar4 = uVar6;\n    }\n    z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));\n    iVar10 = 7;\n    if (z_00 != (char *)0x0) {\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }\n    sqlite3_free(z);\n  }\n  return iVar10;\n}" primitive_type (function_declarator "renameEditSql(sqlite3_context *pCtx,RenameCtx *pRename,char *zSql,char *zNew,int bQuote)" identifier (parameter_list "(sqlite3_context *pCtx,RenameCtx *pRename,char *zSql,char *zNew,int bQuote)" ( (parameter_declaration "sqlite3_context *pCtx" type_identifier (pointer_declarator "*pCtx" * identifier)) , (parameter_declaration "RenameCtx *pRename" type_identifier (pointer_declarator "*pRename" * identifier)) , (parameter_declaration "char *zSql" primitive_type (pointer_declarator "*zSql" * identifier)) , (parameter_declaration "char *zNew" primitive_type (pointer_declarator "*zNew" * identifier)) , (parameter_declaration "int bQuote" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  RenameToken *pRVar2;\n  byte *pbVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  uint uVar7;\n  sqlite3 *db;\n  char *z;\n  char *z_00;\n  RenameCtx *pRVar8;\n  RenameToken *pRVar9;\n  RenameToken *p;\n  int iVar10;\n  char *__src;\n  \n  uVar4 = sqlite3Strlen30(zNew);\n  iVar5 = sqlite3Strlen30(zSql);\n  db = sqlite3_context_db_handle(pCtx);\n  z = sqlite3MPrintf(db,"\"%w\"",zNew);\n  if (z == (char *)0x0) {\n    iVar10 = 7;\n  }\n  else {\n    uVar6 = sqlite3Strlen30(z);\n    if (bQuote != 0) {\n      zNew = z;\n      uVar4 = uVar6;\n    }\n    z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));\n    iVar10 = 7;\n    if (z_00 != (char *)0x0) {\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }\n    sqlite3_free(z);\n  }\n  return iVar10;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "RenameToken *pRVar2;" type_identifier (pointer_declarator "*pRVar2" * identifier) ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (declaration "char *z;" primitive_type (pointer_declarator "*z" * identifier) ;) (declaration "char *z_00;" primitive_type (pointer_declarator "*z_00" * identifier) ;) (declaration "RenameCtx *pRVar8;" type_identifier (pointer_declarator "*pRVar8" * identifier) ;) (declaration "RenameToken *pRVar9;" type_identifier (pointer_declarator "*pRVar9" * identifier) ;) (declaration "RenameToken *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (expression_statement "uVar4 = sqlite3Strlen30(zNew);" (assignment_expression "uVar4 = sqlite3Strlen30(zNew)" identifier = (call_expression "sqlite3Strlen30(zNew)" identifier (argument_list "(zNew)" ( identifier )))) ;) (expression_statement "iVar5 = sqlite3Strlen30(zSql);" (assignment_expression "iVar5 = sqlite3Strlen30(zSql)" identifier = (call_expression "sqlite3Strlen30(zSql)" identifier (argument_list "(zSql)" ( identifier )))) ;) (expression_statement "db = sqlite3_context_db_handle(pCtx);" (assignment_expression "db = sqlite3_context_db_handle(pCtx)" identifier = (call_expression "sqlite3_context_db_handle(pCtx)" identifier (argument_list "(pCtx)" ( identifier )))) ;) (expression_statement "z = sqlite3MPrintf(db,"\"%w\"",zNew);" (assignment_expression "z = sqlite3MPrintf(db,"\"%w\"",zNew)" identifier = (call_expression "sqlite3MPrintf(db,"\"%w\"",zNew)" identifier (argument_list "(db,"\"%w\"",zNew)" ( identifier , (string_literal ""\"%w\""" " escape_sequence string_content escape_sequence ") , identifier )))) ;) (if_statement "if (z == (char *)0x0) {\n    iVar10 = 7;\n  }\n  else {\n    uVar6 = sqlite3Strlen30(z);\n    if (bQuote != 0) {\n      zNew = z;\n      uVar4 = uVar6;\n    }\n    z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));\n    iVar10 = 7;\n    if (z_00 != (char *)0x0) {\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }\n    sqlite3_free(z);\n  }" if (parenthesized_expression "(z == (char *)0x0)" ( (binary_expression "z == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar10 = 7;\n  }" { (expression_statement "iVar10 = 7;" (assignment_expression "iVar10 = 7" identifier = number_literal) ;) }) (else_clause "else {\n    uVar6 = sqlite3Strlen30(z);\n    if (bQuote != 0) {\n      zNew = z;\n      uVar4 = uVar6;\n    }\n    z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));\n    iVar10 = 7;\n    if (z_00 != (char *)0x0) {\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }\n    sqlite3_free(z);\n  }" else (compound_statement "{\n    uVar6 = sqlite3Strlen30(z);\n    if (bQuote != 0) {\n      zNew = z;\n      uVar4 = uVar6;\n    }\n    z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));\n    iVar10 = 7;\n    if (z_00 != (char *)0x0) {\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }\n    sqlite3_free(z);\n  }" { (expression_statement "uVar6 = sqlite3Strlen30(z);" (assignment_expression "uVar6 = sqlite3Strlen30(z)" identifier = (call_expression "sqlite3Strlen30(z)" identifier (argument_list "(z)" ( identifier )))) ;) (if_statement "if (bQuote != 0) {\n      zNew = z;\n      uVar4 = uVar6;\n    }" if (parenthesized_expression "(bQuote != 0)" ( (binary_expression "bQuote != 0" identifier != number_literal) )) (compound_statement "{\n      zNew = z;\n      uVar4 = uVar6;\n    }" { (expression_statement "zNew = z;" (assignment_expression "zNew = z" identifier = identifier) ;) (expression_statement "uVar4 = uVar6;" (assignment_expression "uVar4 = uVar6" identifier = identifier) ;) })) (expression_statement "z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList));" (assignment_expression "z_00 = (char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList))" identifier = (cast_expression "(char *)sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocZero(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList))" identifier (argument_list "(db,(long)(int)(iVar5 + 1 + uVar6 * pRename->nList))" ( identifier , (cast_expression "(long)(int)(iVar5 + 1 + uVar6 * pRename->nList)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(iVar5 + 1 + uVar6 * pRename->nList)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(iVar5 + 1 + uVar6 * pRename->nList)" ( (binary_expression "iVar5 + 1 + uVar6 * pRename->nList" (binary_expression "iVar5 + 1" identifier + number_literal) + (binary_expression "uVar6 * pRename->nList" identifier * (field_expression "pRename->nList" identifier -> field_identifier))) )))) ))))) ;) (expression_statement "iVar10 = 7;" (assignment_expression "iVar10 = 7" identifier = number_literal) ;) (if_statement "if (z_00 != (char *)0x0) {\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }" if (parenthesized_expression "(z_00 != (char *)0x0)" ( (binary_expression "z_00 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(z_00,zSql,(long)iVar5);\n      pRVar2 = pRename->pList;\n      while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }\n      sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);\n      sqlite3DbFree(db,z_00);\n      iVar10 = 0;\n    }" { (expression_statement "memcpy(z_00,zSql,(long)iVar5);" (call_expression "memcpy(z_00,zSql,(long)iVar5)" identifier (argument_list "(z_00,zSql,(long)iVar5)" ( identifier , identifier , (cast_expression "(long)iVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "pRVar2 = pRename->pList;" (assignment_expression "pRVar2 = pRename->pList" identifier = (field_expression "pRename->pList" identifier -> field_identifier)) ;) (while_statement "while (pRVar2 != (RenameToken *)0x0) {\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }" while (parenthesized_expression "(pRVar2 != (RenameToken *)0x0)" ( (binary_expression "pRVar2 != (RenameToken *)0x0" identifier != (cast_expression "(RenameToken *)0x0" ( (type_descriptor "RenameToken *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        pRVar9 = pRVar2->pNext;\n        pRVar8 = pRename;\n        p = pRVar2;\n        if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }\n        pRVar8->pList = p->pNext;\n        pbVar3 = (byte *)(p->t).z;\n        __src = z;\n        uVar1 = uVar6;\n        if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }\n        iVar10 = (int)pbVar3 - (int)zSql;\n        uVar7 = (p->t).n;\n        if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }\n        memcpy(z_00 + iVar10,__src,(ulong)uVar1);\n        sqlite3DbFree(db,p);\n        pRVar2 = pRename->pList;\n      }" { (expression_statement "pRVar9 = pRVar2->pNext;" (assignment_expression "pRVar9 = pRVar2->pNext" identifier = (field_expression "pRVar2->pNext" identifier -> field_identifier)) ;) (expression_statement "pRVar8 = pRename;" (assignment_expression "pRVar8 = pRename" identifier = identifier) ;) (expression_statement "p = pRVar2;" (assignment_expression "p = pRVar2" identifier = identifier) ;) (if_statement "if (pRVar9 != (RenameToken *)0x0) {\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }" if (parenthesized_expression "(pRVar9 != (RenameToken *)0x0)" ( (binary_expression "pRVar9 != (RenameToken *)0x0" identifier != (cast_expression "(RenameToken *)0x0" ( (type_descriptor "RenameToken *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);\n          if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }\n        }" { (do_statement "do {\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          } while (pRVar9 != (RenameToken *)0x0);" do (compound_statement "{\n            if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }\n            pRVar9 = pRVar9->pNext;\n          }" { (if_statement "if ((p->t).z < (pRVar9->t).z) {\n              p = pRVar9;\n            }" if (parenthesized_expression "((p->t).z < (pRVar9->t).z)" ( (binary_expression "(p->t).z < (pRVar9->t).z" (field_expression "(p->t).z" (parenthesized_expression "(p->t)" ( (field_expression "p->t" identifier -> field_identifier) )) . field_identifier) < (field_expression "(pRVar9->t).z" (parenthesized_expression "(pRVar9->t)" ( (field_expression "pRVar9->t" identifier -> field_identifier) )) . field_identifier)) )) (compound_statement "{\n              p = pRVar9;\n            }" { (expression_statement "p = pRVar9;" (assignment_expression "p = pRVar9" identifier = identifier) ;) })) (expression_statement "pRVar9 = pRVar9->pNext;" (assignment_expression "pRVar9 = pRVar9->pNext" identifier = (field_expression "pRVar9->pNext" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pRVar9 != (RenameToken *)0x0)" ( (binary_expression "pRVar9 != (RenameToken *)0x0" identifier != (cast_expression "(RenameToken *)0x0" ( (type_descriptor "RenameToken *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (if_statement "if (p != pRVar2) {\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }" if (parenthesized_expression "(p != pRVar2)" ( (binary_expression "p != pRVar2" identifier != identifier) )) (compound_statement "{\n            do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);\n            pRVar8 = (RenameCtx *)&pRVar9->pNext;\n          }" { (do_statement "do {\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            } while (pRVar2 != p);" do (compound_statement "{\n              pRVar9 = pRVar2;\n              pRVar2 = pRVar9->pNext;\n            }" { (expression_statement "pRVar9 = pRVar2;" (assignment_expression "pRVar9 = pRVar2" identifier = identifier) ;) (expression_statement "pRVar2 = pRVar9->pNext;" (assignment_expression "pRVar2 = pRVar9->pNext" identifier = (field_expression "pRVar9->pNext" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pRVar2 != p)" ( (binary_expression "pRVar2 != p" identifier != identifier) )) ;) (expression_statement "pRVar8 = (RenameCtx *)&pRVar9->pNext;" (assignment_expression "pRVar8 = (RenameCtx *)&pRVar9->pNext" identifier = (cast_expression "(RenameCtx *)&pRVar9->pNext" ( (type_descriptor "RenameCtx *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pRVar9->pNext" & (field_expression "pRVar9->pNext" identifier -> field_identifier)))) ;) })) })) (expression_statement "pRVar8->pList = p->pNext;" (assignment_expression "pRVar8->pList = p->pNext" (field_expression "pRVar8->pList" identifier -> field_identifier) = (field_expression "p->pNext" identifier -> field_identifier)) ;) (expression_statement "pbVar3 = (byte *)(p->t).z;" (assignment_expression "pbVar3 = (byte *)(p->t).z" identifier = (cast_expression "(byte *)(p->t).z" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(p->t).z" (parenthesized_expression "(p->t)" ( (field_expression "p->t" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "__src = z;" (assignment_expression "__src = z" identifier = identifier) ;) (expression_statement "uVar1 = uVar6;" (assignment_expression "uVar1 = uVar6" identifier = identifier) ;) (if_statement "if ((""[*pbVar3] & 0x46) != 0) {\n          __src = zNew;\n          uVar1 = uVar4;\n        }" if (parenthesized_expression "((""[*pbVar3] & 0x46) != 0)" ( (binary_expression "(""[*pbVar3] & 0x46) != 0" (parenthesized_expression "(""[*pbVar3] & 0x46)" ( (binary_expression """[*pbVar3] & 0x46" (subscript_expression """[*pbVar3]" (string_literal """" " ") [ (pointer_expression "*pbVar3" * identifier) ]) & number_literal) )) != number_literal) )) (compound_statement "{\n          __src = zNew;\n          uVar1 = uVar4;\n        }" { (expression_statement "__src = zNew;" (assignment_expression "__src = zNew" identifier = identifier) ;) (expression_statement "uVar1 = uVar4;" (assignment_expression "uVar1 = uVar4" identifier = identifier) ;) })) (expression_statement "iVar10 = (int)pbVar3 - (int)zSql;" (assignment_expression "iVar10 = (int)pbVar3 - (int)zSql" identifier = (binary_expression "(int)pbVar3 - (int)zSql" (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)zSql" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "uVar7 = (p->t).n;" (assignment_expression "uVar7 = (p->t).n" identifier = (field_expression "(p->t).n" (parenthesized_expression "(p->t)" ( (field_expression "p->t" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (uVar7 != uVar1) {\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }" if (parenthesized_expression "(uVar7 != uVar1)" ( (binary_expression "uVar7 != uVar1" identifier != identifier) )) (compound_statement "{\n          uVar7 = uVar7 + iVar10;\n          memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));\n          iVar5 = (iVar5 - (p->t).n) + uVar1;\n          z_00[iVar5] = '\0';\n        }" { (expression_statement "uVar7 = uVar7 + iVar10;" (assignment_expression "uVar7 = uVar7 + iVar10" identifier = (binary_expression "uVar7 + iVar10" identifier + identifier)) ;) (expression_statement "memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7));" (call_expression "memmove(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7))" identifier (argument_list "(z_00 + (uVar1 + iVar10),z_00 + uVar7,(ulong)(iVar5 - uVar7))" ( (binary_expression "z_00 + (uVar1 + iVar10)" identifier + (parenthesized_expression "(uVar1 + iVar10)" ( (binary_expression "uVar1 + iVar10" identifier + identifier) ))) , (binary_expression "z_00 + uVar7" identifier + identifier) , (call_expression "(ulong)(iVar5 - uVar7)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar5 - uVar7)" ( (binary_expression "iVar5 - uVar7" identifier - identifier) ))) ))) ;) (expression_statement "iVar5 = (iVar5 - (p->t).n) + uVar1;" (assignment_expression "iVar5 = (iVar5 - (p->t).n) + uVar1" identifier = (binary_expression "(iVar5 - (p->t).n) + uVar1" (parenthesized_expression "(iVar5 - (p->t).n)" ( (binary_expression "iVar5 - (p->t).n" identifier - (field_expression "(p->t).n" (parenthesized_expression "(p->t)" ( (field_expression "p->t" identifier -> field_identifier) )) . field_identifier)) )) + identifier)) ;) (expression_statement "z_00[iVar5] = '\0';" (assignment_expression "z_00[iVar5] = '\0'" (subscript_expression "z_00[iVar5]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (expression_statement "memcpy(z_00 + iVar10,__src,(ulong)uVar1);" (call_expression "memcpy(z_00 + iVar10,__src,(ulong)uVar1)" identifier (argument_list "(z_00 + iVar10,__src,(ulong)uVar1)" ( (binary_expression "z_00 + iVar10" identifier + identifier) , identifier , (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "sqlite3DbFree(db,p);" (call_expression "sqlite3DbFree(db,p)" identifier (argument_list "(db,p)" ( identifier , identifier ))) ;) (expression_statement "pRVar2 = pRename->pList;" (assignment_expression "pRVar2 = pRename->pList" identifier = (field_expression "pRename->pList" identifier -> field_identifier)) ;) })) (expression_statement "sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff);" (call_expression "sqlite3_result_text(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff)" identifier (argument_list "(pCtx,z_00,-1,(_func_void_void_ptr *)0xffffffffffffffff)" ( identifier , identifier , number_literal , (cast_expression "(_func_void_void_ptr *)0xffffffffffffffff" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (expression_statement "sqlite3DbFree(db,z_00);" (call_expression "sqlite3DbFree(db,z_00)" identifier (argument_list "(db,z_00)" ( identifier , identifier ))) ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) })) (expression_statement "sqlite3_free(z);" (call_expression "sqlite3_free(z)" identifier (argument_list "(z)" ( identifier ))) ;) }))) (return_statement "return iVar10;" return identifier ;) })))
(translation_unit "undefined8 FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}\n\n" (function_definition "undefined8 FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}" type_identifier (function_declarator "FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)" identifier (parameter_list "(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "void *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "void *pvVar8;" primitive_type (pointer_declarator "*pvVar8" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "long *plVar9;" (sized_type_specifier "long" long) (pointer_declarator "*plVar9" * identifier) ;) (declaration "long lVar10;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar11;" type_identifier identifier ;) (declaration "long lVar12;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar13;" primitive_type identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (expression_statement "uVar3 = FUN_0011572f(param_4);" (assignment_expression "uVar3 = FUN_0011572f(param_4)" identifier = (call_expression "FUN_0011572f(param_4)" identifier (argument_list "(param_4)" ( identifier )))) ;) (expression_statement "iVar4 = FUN_0011572f(param_3);" (assignment_expression "iVar4 = FUN_0011572f(param_3)" identifier = (call_expression "FUN_0011572f(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "uVar7 = sqlite3_context_db_handle(param_1);" (assignment_expression "uVar7 = sqlite3_context_db_handle(param_1)" identifier = (call_expression "sqlite3_context_db_handle(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);" (assignment_expression "pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4)" identifier = (cast_expression "(void *)FUN_00130001(uVar7,&DAT_0018f082,param_4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00130001(uVar7,&DAT_0018f082,param_4)" identifier (argument_list "(uVar7,&DAT_0018f082,param_4)" ( identifier , (pointer_expression "&DAT_0018f082" & identifier) , identifier ))))) ;) (if_statement "if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" if (parenthesized_expression "(pvVar8 == (void *)0x0)" ( (binary_expression "pvVar8 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar11 = 7;\n  }" { (expression_statement "uVar11 = 7;" (assignment_expression "uVar11 = 7" identifier = number_literal) ;) }) (else_clause "else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" else (compound_statement "{\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" { (expression_statement "uVar5 = FUN_0011572f(pvVar8);" (assignment_expression "uVar5 = FUN_0011572f(pvVar8)" identifier = (call_expression "FUN_0011572f(pvVar8)" identifier (argument_list "(pvVar8)" ( identifier )))) ;) (if_statement "if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }" { (expression_statement "param_4 = pvVar8;" (assignment_expression "param_4 = pvVar8" identifier = identifier) ;) (expression_statement "uVar3 = uVar5;" (assignment_expression "uVar3 = uVar5" identifier = identifier) ;) })) (expression_statement "__dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));" (assignment_expression "__dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" identifier = (cast_expression "(void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" identifier (argument_list "(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" ( identifier , (cast_expression "(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1])" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(iVar4 + 1 + uVar5 * (int)param_2[1])" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(iVar4 + 1 + uVar5 * (int)param_2[1])" ( (binary_expression "iVar4 + 1 + uVar5 * (int)param_2[1]" (binary_expression "iVar4 + 1" identifier + number_literal) + (binary_expression "uVar5 * (int)param_2[1]" identifier * (cast_expression "(int)param_2[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])))) )))) ))))) ;) (expression_statement "uVar11 = 7;" (assignment_expression "uVar11 = 7" identifier = number_literal) ;) (if_statement "if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }" { (expression_statement "memcpy(__dest,param_3,(long)iVar4);" (call_expression "memcpy(__dest,param_3,(long)iVar4)" identifier (argument_list "(__dest,param_3,(long)iVar4)" ( identifier , identifier , (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "lVar2 = *param_2;" (assignment_expression "lVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (while_statement "while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }" while (parenthesized_expression "(lVar2 != 0)" ( (binary_expression "lVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }" { (expression_statement "lVar10 = *(long *)(lVar2 + 0x18);" (assignment_expression "lVar10 = *(long *)(lVar2 + 0x18)" identifier = (pointer_expression "*(long *)(lVar2 + 0x18)" * (cast_expression "(long *)(lVar2 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x18)" ( (binary_expression "lVar2 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "plVar9 = param_2;" (assignment_expression "plVar9 = param_2" identifier = identifier) ;) (expression_statement "lVar12 = lVar2;" (assignment_expression "lVar12 = lVar2" identifier = identifier) ;) (if_statement "if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }" if (parenthesized_expression "(lVar10 != 0)" ( (binary_expression "lVar10 != 0" identifier != number_literal) )) (compound_statement "{\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }" { (do_statement "do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);" do (compound_statement "{\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          }" { (if_statement "if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }" if (parenthesized_expression "(*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8))" ( (binary_expression "*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)" (pointer_expression "*(ulong *)(lVar12 + 8)" * (cast_expression "(ulong *)(lVar12 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 8)" ( (binary_expression "lVar12 + 8" identifier + number_literal) )))) < (pointer_expression "*(ulong *)(lVar10 + 8)" * (cast_expression "(ulong *)(lVar10 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 8)" ( (binary_expression "lVar10 + 8" identifier + number_literal) ))))) )) (compound_statement "{\n              lVar12 = lVar10;\n            }" { (expression_statement "lVar12 = lVar10;" (assignment_expression "lVar12 = lVar10" identifier = identifier) ;) })) (expression_statement "lVar10 = *(long *)(lVar10 + 0x18);" (assignment_expression "lVar10 = *(long *)(lVar10 + 0x18)" identifier = (pointer_expression "*(long *)(lVar10 + 0x18)" * (cast_expression "(long *)(lVar10 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 0x18)" ( (binary_expression "lVar10 + 0x18" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(lVar10 != 0)" ( (binary_expression "lVar10 != 0" identifier != number_literal) )) ;) (if_statement "if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }" if (parenthesized_expression "(lVar12 != lVar2)" ( (binary_expression "lVar12 != lVar2" identifier != identifier) )) (compound_statement "{\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }" { (do_statement "do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);" do (compound_statement "{\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            }" { (expression_statement "lVar10 = lVar2;" (assignment_expression "lVar10 = lVar2" identifier = identifier) ;) (expression_statement "lVar2 = *(long *)(lVar10 + 0x18);" (assignment_expression "lVar2 = *(long *)(lVar10 + 0x18)" identifier = (pointer_expression "*(long *)(lVar10 + 0x18)" * (cast_expression "(long *)(lVar10 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 0x18)" ( (binary_expression "lVar10 + 0x18" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(lVar2 != lVar12)" ( (binary_expression "lVar2 != lVar12" identifier != identifier) )) ;) (expression_statement "plVar9 = (long *)(lVar10 + 0x18);" (assignment_expression "plVar9 = (long *)(lVar10 + 0x18)" identifier = (cast_expression "(long *)(lVar10 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar10 + 0x18)" ( (binary_expression "lVar10 + 0x18" identifier + number_literal) )))) ;) })) })) (expression_statement "*plVar9 = *(long *)(lVar12 + 0x18);" (assignment_expression "*plVar9 = *(long *)(lVar12 + 0x18)" (pointer_expression "*plVar9" * identifier) = (pointer_expression "*(long *)(lVar12 + 0x18)" * (cast_expression "(long *)(lVar12 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x18)" ( (binary_expression "lVar12 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "__src = pvVar8;" (assignment_expression "__src = pvVar8" identifier = identifier) ;) (expression_statement "uVar1 = uVar5;" (assignment_expression "uVar1 = uVar5" identifier = identifier) ;) (if_statement "if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }" if (parenthesized_expression "(((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0)" ( (binary_expression "((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0" (parenthesized_expression "((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46)" ( (binary_expression "(&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46" (subscript_expression "(&DAT_00196400)[**(byte **)(lVar12 + 8)]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (pointer_expression "**(byte **)(lVar12 + 8)" * (pointer_expression "*(byte **)(lVar12 + 8)" * (cast_expression "(byte **)(lVar12 + 8)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar12 + 8)" ( (binary_expression "lVar12 + 8" identifier + number_literal) ))))) ]) & number_literal) )) != number_literal) )) (compound_statement "{\n          __src = param_4;\n          uVar1 = uVar3;\n        }" { (expression_statement "__src = param_4;" (assignment_expression "__src = param_4" identifier = identifier) ;) (expression_statement "uVar1 = uVar3;" (assignment_expression "uVar1 = uVar3" identifier = identifier) ;) })) (expression_statement "iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;" (assignment_expression "iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3" identifier = (binary_expression "(int)*(byte **)(lVar12 + 8) - (int)param_3" (cast_expression "(int)*(byte **)(lVar12 + 8)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(byte **)(lVar12 + 8)" * (cast_expression "(byte **)(lVar12 + 8)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar12 + 8)" ( (binary_expression "lVar12 + 8" identifier + number_literal) ))))) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }" if (parenthesized_expression "(*(uint *)(lVar12 + 0x10) != uVar1)" ( (binary_expression "*(uint *)(lVar12 + 0x10) != uVar1" (pointer_expression "*(uint *)(lVar12 + 0x10)" * (cast_expression "(uint *)(lVar12 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x10)" ( (binary_expression "lVar12 + 0x10" identifier + number_literal) )))) != identifier) )) (compound_statement "{\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }" { (expression_statement "uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;" (assignment_expression "uVar6 = *(uint *)(lVar12 + 0x10) + iVar13" identifier = (binary_expression "*(uint *)(lVar12 + 0x10) + iVar13" (pointer_expression "*(uint *)(lVar12 + 0x10)" * (cast_expression "(uint *)(lVar12 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x10)" ( (binary_expression "lVar12 + 0x10" identifier + number_literal) )))) + identifier)) ;) (expression_statement "memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));" (call_expression "memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6))" identifier (argument_list "((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6))" ( (cast_expression "(void *)((ulong)(uVar1 + iVar13) + (long)__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)(uVar1 + iVar13) + (long)__dest)" ( (binary_expression "(ulong)(uVar1 + iVar13) + (long)__dest" (call_expression "(ulong)(uVar1 + iVar13)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar1 + iVar13)" ( (binary_expression "uVar1 + iVar13" identifier + identifier) ))) + (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , (cast_expression "(void *)((long)__dest + (ulong)uVar6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)__dest + (ulong)uVar6)" ( (binary_expression "(long)__dest + (ulong)uVar6" (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(ulong)uVar6" ( (type_descriptor "ulong" type_identifier) ) identifier)) ))) , (call_expression "(ulong)(iVar4 - uVar6)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar4 - uVar6)" ( (binary_expression "iVar4 - uVar6" identifier - identifier) ))) ))) ;) (expression_statement "iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;" (assignment_expression "iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1" identifier = (binary_expression "(iVar4 - *(int *)(lVar12 + 0x10)) + uVar1" (parenthesized_expression "(iVar4 - *(int *)(lVar12 + 0x10))" ( (binary_expression "iVar4 - *(int *)(lVar12 + 0x10)" identifier - (pointer_expression "*(int *)(lVar12 + 0x10)" * (cast_expression "(int *)(lVar12 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar12 + 0x10)" ( (binary_expression "lVar12 + 0x10" identifier + number_literal) ))))) )) + identifier)) ;) (expression_statement "*(undefined1 *)((long)__dest + (long)iVar4) = 0;" (assignment_expression "*(undefined1 *)((long)__dest + (long)iVar4) = 0" (pointer_expression "*(undefined1 *)((long)__dest + (long)iVar4)" * (cast_expression "(undefined1 *)((long)__dest + (long)iVar4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)__dest + (long)iVar4)" ( (binary_expression "(long)__dest + (long)iVar4" (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) = number_literal) ;) })) (expression_statement "memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);" (call_expression "memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1)" identifier (argument_list "((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1)" ( (cast_expression "(void *)((long)iVar13 + (long)__dest)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)iVar13 + (long)__dest)" ( (binary_expression "(long)iVar13 + (long)__dest" (cast_expression "(long)iVar13" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , identifier , (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "FUN_00119825(uVar7,lVar12);" (call_expression "FUN_00119825(uVar7,lVar12)" identifier (argument_list "(uVar7,lVar12)" ( identifier , identifier ))) ;) (expression_statement "lVar2 = *param_2;" (assignment_expression "lVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (expression_statement "sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);" (call_expression "sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff)" identifier (argument_list "(param_1,__dest,0xffffffff,0xffffffffffffffff)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_00119825(uVar7,__dest);" (call_expression "FUN_00119825(uVar7,__dest)" identifier (argument_list "(uVar7,__dest)" ( identifier , identifier ))) ;) (expression_statement "uVar11 = 0;" (assignment_expression "uVar11 = 0" identifier = number_literal) ;) })) (expression_statement "sqlite3_free(pvVar8);" (call_expression "sqlite3_free(pvVar8)" identifier (argument_list "(pvVar8)" ( identifier ))) ;) }))) (return_statement "return uVar11;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) (subscript_expression 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 (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ]) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + IDENT) ))) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ))) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) , (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - IDENT) ))) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )))) = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ))) , IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8 FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}" (type_identifier "undefined8") (function_declarator "FUN_00130128(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)" (identifier "FUN_00130128") (parameter_list "(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "long *param_2" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "void *param_3" (primitive_type "void") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "void *param_4" (primitive_type "void") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  undefined8 uVar7;\n  void *pvVar8;\n  void *__dest;\n  long *plVar9;\n  long lVar10;\n  undefined8 uVar11;\n  long lVar12;\n  int iVar13;\n  void *__src;\n  \n  uVar3 = FUN_0011572f(param_4);\n  iVar4 = FUN_0011572f(param_3);\n  uVar7 = sqlite3_context_db_handle(param_1);\n  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);\n  if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }\n  return uVar11;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "undefined8 uVar7;" (type_identifier "undefined8") (identifier "uVar7") (; ";")) (declaration "void *pvVar8;" (primitive_type "void") (pointer_declarator "*pvVar8" (* "*") (identifier "pvVar8")) (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "long *plVar9;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar9" (* "*") (identifier "plVar9")) (; ";")) (declaration "long lVar10;" (sized_type_specifier "long" (long "long")) (identifier "lVar10") (; ";")) (declaration "undefined8 uVar11;" (type_identifier "undefined8") (identifier "uVar11") (; ";")) (declaration "long lVar12;" (sized_type_specifier "long" (long "long")) (identifier "lVar12") (; ";")) (declaration "int iVar13;" (primitive_type "int") (identifier "iVar13") (; ";")) (declaration "void *__src;" (primitive_type "void") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (expression_statement "uVar3 = FUN_0011572f(param_4);" (assignment_expression "uVar3 = FUN_0011572f(param_4)" (identifier "uVar3") (= "=") (call_expression "FUN_0011572f(param_4)" (identifier "FUN_0011572f") (argument_list "(param_4)" (( "(") (identifier "param_4") () ")")))) (; ";")) (expression_statement "iVar4 = FUN_0011572f(param_3);" (assignment_expression "iVar4 = FUN_0011572f(param_3)" (identifier "iVar4") (= "=") (call_expression "FUN_0011572f(param_3)" (identifier "FUN_0011572f") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "uVar7 = sqlite3_context_db_handle(param_1);" (assignment_expression "uVar7 = sqlite3_context_db_handle(param_1)" (identifier "uVar7") (= "=") (call_expression "sqlite3_context_db_handle(param_1)" (identifier "sqlite3_context_db_handle") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);" (assignment_expression "pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4)" (identifier "pvVar8") (= "=") (cast_expression "(void *)FUN_00130001(uVar7,&DAT_0018f082,param_4)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00130001(uVar7,&DAT_0018f082,param_4)" (identifier "FUN_00130001") (argument_list "(uVar7,&DAT_0018f082,param_4)" (( "(") (identifier "uVar7") (, ",") (pointer_expression "&DAT_0018f082" (& "&") (identifier "DAT_0018f082")) (, ",") (identifier "param_4") () ")"))))) (; ";")) (if_statement "if (pvVar8 == (void *)0x0) {\n    uVar11 = 7;\n  }\n  else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" (if "if") (parenthesized_expression "(pvVar8 == (void *)0x0)" (( "(") (binary_expression "pvVar8 == (void *)0x0" (identifier "pvVar8") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar11 = 7;\n  }" ({ "{") (expression_statement "uVar11 = 7;" (assignment_expression "uVar11 = 7" (identifier "uVar11") (= "=") (number_literal "7")) (; ";")) (} "}")) (else_clause "else {\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" (else "else") (compound_statement "{\n    uVar5 = FUN_0011572f(pvVar8);\n    if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }\n    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));\n    uVar11 = 7;\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }\n    sqlite3_free(pvVar8);\n  }" ({ "{") (expression_statement "uVar5 = FUN_0011572f(pvVar8);" (assignment_expression "uVar5 = FUN_0011572f(pvVar8)" (identifier "uVar5") (= "=") (call_expression "FUN_0011572f(pvVar8)" (identifier "FUN_0011572f") (argument_list "(pvVar8)" (( "(") (identifier "pvVar8") () ")")))) (; ";")) (if_statement "if (param_5 != 0) {\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }" (if "if") (parenthesized_expression "(param_5 != 0)" (( "(") (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      param_4 = pvVar8;\n      uVar3 = uVar5;\n    }" ({ "{") (expression_statement "param_4 = pvVar8;" (assignment_expression "param_4 = pvVar8" (identifier "param_4") (= "=") (identifier "pvVar8")) (; ";")) (expression_statement "uVar3 = uVar5;" (assignment_expression "uVar3 = uVar5" (identifier "uVar3") (= "=") (identifier "uVar5")) (; ";")) (} "}"))) (expression_statement "__dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));" (assignment_expression "__dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" (identifier "__dest") (= "=") (cast_expression "(void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" (identifier "FUN_001225e4") (argument_list "(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]))" (( "(") (identifier "uVar7") (, ",") (cast_expression "(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1])" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(iVar4 + 1 + uVar5 * (int)param_2[1])" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(iVar4 + 1 + uVar5 * (int)param_2[1])" (( "(") (binary_expression "iVar4 + 1 + uVar5 * (int)param_2[1]" (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1")) (+ "+") (binary_expression "uVar5 * (int)param_2[1]" (identifier "uVar5") (* "*") (cast_expression "(int)param_2[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))))) () ")")))) () ")"))))) (; ";")) (expression_statement "uVar11 = 7;" (assignment_expression "uVar11 = 7" (identifier "uVar11") (= "=") (number_literal "7")) (; ";")) (if_statement "if (__dest != (void *)0x0) {\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }" (if "if") (parenthesized_expression "(__dest != (void *)0x0)" (( "(") (binary_expression "__dest != (void *)0x0" (identifier "__dest") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      memcpy(__dest,param_3,(long)iVar4);\n      lVar2 = *param_2;\n      while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }\n      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);\n      FUN_00119825(uVar7,__dest);\n      uVar11 = 0;\n    }" ({ "{") (expression_statement "memcpy(__dest,param_3,(long)iVar4);" (call_expression "memcpy(__dest,param_3,(long)iVar4)" (identifier "memcpy") (argument_list "(__dest,param_3,(long)iVar4)" (( "(") (identifier "__dest") (, ",") (identifier "param_3") (, ",") (cast_expression "(long)iVar4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar4")) () ")"))) (; ";")) (expression_statement "lVar2 = *param_2;" (assignment_expression "lVar2 = *param_2" (identifier "lVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (while_statement "while (lVar2 != 0) {\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }" (while "while") (parenthesized_expression "(lVar2 != 0)" (( "(") (binary_expression "lVar2 != 0" (identifier "lVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        lVar10 = *(long *)(lVar2 + 0x18);\n        plVar9 = param_2;\n        lVar12 = lVar2;\n        if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }\n        *plVar9 = *(long *)(lVar12 + 0x18);\n        __src = pvVar8;\n        uVar1 = uVar5;\n        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }\n        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;\n        if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }\n        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);\n        FUN_00119825(uVar7,lVar12);\n        lVar2 = *param_2;\n      }" ({ "{") (expression_statement "lVar10 = *(long *)(lVar2 + 0x18);" (assignment_expression "lVar10 = *(long *)(lVar2 + 0x18)" (identifier "lVar10") (= "=") (pointer_expression "*(long *)(lVar2 + 0x18)" (* "*") (cast_expression "(long *)(lVar2 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x18)" (( "(") (binary_expression "lVar2 + 0x18" (identifier "lVar2") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "plVar9 = param_2;" (assignment_expression "plVar9 = param_2" (identifier "plVar9") (= "=") (identifier "param_2")) (; ";")) (expression_statement "lVar12 = lVar2;" (assignment_expression "lVar12 = lVar2" (identifier "lVar12") (= "=") (identifier "lVar2")) (; ";")) (if_statement "if (lVar10 != 0) {\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }" (if "if") (parenthesized_expression "(lVar10 != 0)" (( "(") (binary_expression "lVar10 != 0" (identifier "lVar10") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);\n          if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }\n        }" ({ "{") (do_statement "do {\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          } while (lVar10 != 0);" (do "do") (compound_statement "{\n            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }\n            lVar10 = *(long *)(lVar10 + 0x18);\n          }" ({ "{") (if_statement "if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {\n              lVar12 = lVar10;\n            }" (if "if") (parenthesized_expression "(*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8))" (( "(") (binary_expression "*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)" (pointer_expression "*(ulong *)(lVar12 + 8)" (* "*") (cast_expression "(ulong *)(lVar12 + 8)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar12 + 8)" (( "(") (binary_expression "lVar12 + 8" (identifier "lVar12") (+ "+") (number_literal "8")) () ")")))) (< "<") (pointer_expression "*(ulong *)(lVar10 + 8)" (* "*") (cast_expression "(ulong *)(lVar10 + 8)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar10 + 8)" (( "(") (binary_expression "lVar10 + 8" (identifier "lVar10") (+ "+") (number_literal "8")) () ")"))))) () ")")) (compound_statement "{\n              lVar12 = lVar10;\n            }" ({ "{") (expression_statement "lVar12 = lVar10;" (assignment_expression "lVar12 = lVar10" (identifier "lVar12") (= "=") (identifier "lVar10")) (; ";")) (} "}"))) (expression_statement "lVar10 = *(long *)(lVar10 + 0x18);" (assignment_expression "lVar10 = *(long *)(lVar10 + 0x18)" (identifier "lVar10") (= "=") (pointer_expression "*(long *)(lVar10 + 0x18)" (* "*") (cast_expression "(long *)(lVar10 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar10 + 0x18)" (( "(") (binary_expression "lVar10 + 0x18" (identifier "lVar10") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar10 != 0)" (( "(") (binary_expression "lVar10 != 0" (identifier "lVar10") (!= "!=") (number_literal "0")) () ")")) (; ";")) (if_statement "if (lVar12 != lVar2) {\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }" (if "if") (parenthesized_expression "(lVar12 != lVar2)" (( "(") (binary_expression "lVar12 != lVar2" (identifier "lVar12") (!= "!=") (identifier "lVar2")) () ")")) (compound_statement "{\n            do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);\n            plVar9 = (long *)(lVar10 + 0x18);\n          }" ({ "{") (do_statement "do {\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            } while (lVar2 != lVar12);" (do "do") (compound_statement "{\n              lVar10 = lVar2;\n              lVar2 = *(long *)(lVar10 + 0x18);\n            }" ({ "{") (expression_statement "lVar10 = lVar2;" (assignment_expression "lVar10 = lVar2" (identifier "lVar10") (= "=") (identifier "lVar2")) (; ";")) (expression_statement "lVar2 = *(long *)(lVar10 + 0x18);" (assignment_expression "lVar2 = *(long *)(lVar10 + 0x18)" (identifier "lVar2") (= "=") (pointer_expression "*(long *)(lVar10 + 0x18)" (* "*") (cast_expression "(long *)(lVar10 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar10 + 0x18)" (( "(") (binary_expression "lVar10 + 0x18" (identifier "lVar10") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar2 != lVar12)" (( "(") (binary_expression "lVar2 != lVar12" (identifier "lVar2") (!= "!=") (identifier "lVar12")) () ")")) (; ";")) (expression_statement "plVar9 = (long *)(lVar10 + 0x18);" (assignment_expression "plVar9 = (long *)(lVar10 + 0x18)" (identifier "plVar9") (= "=") (cast_expression "(long *)(lVar10 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar10 + 0x18)" (( "(") (binary_expression "lVar10 + 0x18" (identifier "lVar10") (+ "+") (number_literal "0x18")) () ")")))) (; ";")) (} "}"))) (} "}"))) (expression_statement "*plVar9 = *(long *)(lVar12 + 0x18);" (assignment_expression "*plVar9 = *(long *)(lVar12 + 0x18)" (pointer_expression "*plVar9" (* "*") (identifier "plVar9")) (= "=") (pointer_expression "*(long *)(lVar12 + 0x18)" (* "*") (cast_expression "(long *)(lVar12 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar12 + 0x18)" (( "(") (binary_expression "lVar12 + 0x18" (identifier "lVar12") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "__src = pvVar8;" (assignment_expression "__src = pvVar8" (identifier "__src") (= "=") (identifier "pvVar8")) (; ";")) (expression_statement "uVar1 = uVar5;" (assignment_expression "uVar1 = uVar5" (identifier "uVar1") (= "=") (identifier "uVar5")) (; ";")) (if_statement "if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {\n          __src = param_4;\n          uVar1 = uVar3;\n        }" (if "if") (parenthesized_expression "(((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0)" (( "(") (binary_expression "((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0" (parenthesized_expression "((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46)" (( "(") (binary_expression "(&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46" (subscript_expression "(&DAT_00196400)[**(byte **)(lVar12 + 8)]" (parenthesized_expression "(&DAT_00196400)" (( "(") (pointer_expression "&DAT_00196400" (& "&") (identifier "DAT_00196400")) () ")")) ([ "[") (pointer_expression "**(byte **)(lVar12 + 8)" (* "*") (pointer_expression "*(byte **)(lVar12 + 8)" (* "*") (cast_expression "(byte **)(lVar12 + 8)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar12 + 8)" (( "(") (binary_expression "lVar12 + 8" (identifier "lVar12") (+ "+") (number_literal "8")) () ")"))))) (] "]")) (& "&") (number_literal "0x46")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          __src = param_4;\n          uVar1 = uVar3;\n        }" ({ "{") (expression_statement "__src = param_4;" (assignment_expression "__src = param_4" (identifier "__src") (= "=") (identifier "param_4")) (; ";")) (expression_statement "uVar1 = uVar3;" (assignment_expression "uVar1 = uVar3" (identifier "uVar1") (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (expression_statement "iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;" (assignment_expression "iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3" (identifier "iVar13") (= "=") (binary_expression "(int)*(byte **)(lVar12 + 8) - (int)param_3" (cast_expression "(int)*(byte **)(lVar12 + 8)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(byte **)(lVar12 + 8)" (* "*") (cast_expression "(byte **)(lVar12 + 8)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar12 + 8)" (( "(") (binary_expression "lVar12 + 8" (identifier "lVar12") (+ "+") (number_literal "8")) () ")"))))) (- "-") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")))) (; ";")) (if_statement "if (*(uint *)(lVar12 + 0x10) != uVar1) {\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }" (if "if") (parenthesized_expression "(*(uint *)(lVar12 + 0x10) != uVar1)" (( "(") (binary_expression "*(uint *)(lVar12 + 0x10) != uVar1" (pointer_expression "*(uint *)(lVar12 + 0x10)" (* "*") (cast_expression "(uint *)(lVar12 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar12 + 0x10)" (( "(") (binary_expression "lVar12 + 0x10" (identifier "lVar12") (+ "+") (number_literal "0x10")) () ")")))) (!= "!=") (identifier "uVar1")) () ")")) (compound_statement "{\n          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;\n          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));\n          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;\n          *(undefined1 *)((long)__dest + (long)iVar4) = 0;\n        }" ({ "{") (expression_statement "uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;" (assignment_expression "uVar6 = *(uint *)(lVar12 + 0x10) + iVar13" (identifier "uVar6") (= "=") (binary_expression "*(uint *)(lVar12 + 0x10) + iVar13" (pointer_expression "*(uint *)(lVar12 + 0x10)" (* "*") (cast_expression "(uint *)(lVar12 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar12 + 0x10)" (( "(") (binary_expression "lVar12 + 0x10" (identifier "lVar12") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (identifier "iVar13"))) (; ";")) (expression_statement "memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));" (call_expression "memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6))" (identifier "memmove") (argument_list "((void *)((ulong)(uVar1 + iVar13) + (long)__dest),\n                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6))" (( "(") (cast_expression "(void *)((ulong)(uVar1 + iVar13) + (long)__dest)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((ulong)(uVar1 + iVar13) + (long)__dest)" (( "(") (binary_expression "(ulong)(uVar1 + iVar13) + (long)__dest" (call_expression "(ulong)(uVar1 + iVar13)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(uVar1 + iVar13)" (( "(") (binary_expression "uVar1 + iVar13" (identifier "uVar1") (+ "+") (identifier "iVar13")) () ")"))) (+ "+") (cast_expression "(long)__dest" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__dest"))) () ")"))) (, ",") (cast_expression "(void *)((long)__dest + (ulong)uVar6)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)__dest + (ulong)uVar6)" (( "(") (binary_expression "(long)__dest + (ulong)uVar6" (cast_expression "(long)__dest" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__dest")) (+ "+") (cast_expression "(ulong)uVar6" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar6"))) () ")"))) (, ",") (call_expression "(ulong)(iVar4 - uVar6)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(iVar4 - uVar6)" (( "(") (binary_expression "iVar4 - uVar6" (identifier "iVar4") (- "-") (identifier "uVar6")) () ")"))) () ")"))) (; ";")) (expression_statement "iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;" (assignment_expression "iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1" (identifier "iVar4") (= "=") (binary_expression "(iVar4 - *(int *)(lVar12 + 0x10)) + uVar1" (parenthesized_expression "(iVar4 - *(int *)(lVar12 + 0x10))" (( "(") (binary_expression "iVar4 - *(int *)(lVar12 + 0x10)" (identifier "iVar4") (- "-") (pointer_expression "*(int *)(lVar12 + 0x10)" (* "*") (cast_expression "(int *)(lVar12 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar12 + 0x10)" (( "(") (binary_expression "lVar12 + 0x10" (identifier "lVar12") (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (+ "+") (identifier "uVar1"))) (; ";")) (expression_statement "*(undefined1 *)((long)__dest + (long)iVar4) = 0;" (assignment_expression "*(undefined1 *)((long)__dest + (long)iVar4) = 0" (pointer_expression "*(undefined1 *)((long)__dest + (long)iVar4)" (* "*") (cast_expression "(undefined1 *)((long)__dest + (long)iVar4)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)__dest + (long)iVar4)" (( "(") (binary_expression "(long)__dest + (long)iVar4" (cast_expression "(long)__dest" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__dest")) (+ "+") (cast_expression "(long)iVar4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar4"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);" (call_expression "memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1)" (identifier "memcpy") (argument_list "((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1)" (( "(") (cast_expression "(void *)((long)iVar13 + (long)__dest)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)iVar13 + (long)__dest)" (( "(") (binary_expression "(long)iVar13 + (long)__dest" (cast_expression "(long)iVar13" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar13")) (+ "+") (cast_expression "(long)__dest" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__dest"))) () ")"))) (, ",") (identifier "__src") (, ",") (cast_expression "(ulong)uVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar1")) () ")"))) (; ";")) (expression_statement "FUN_00119825(uVar7,lVar12);" (call_expression "FUN_00119825(uVar7,lVar12)" (identifier "FUN_00119825") (argument_list "(uVar7,lVar12)" (( "(") (identifier "uVar7") (, ",") (identifier "lVar12") () ")"))) (; ";")) (expression_statement "lVar2 = *param_2;" (assignment_expression "lVar2 = *param_2" (identifier "lVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}"))) (expression_statement "sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);" (call_expression "sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff)" (identifier "sqlite3_result_text") (argument_list "(param_1,__dest,0xffffffff,0xffffffffffffffff)" (( "(") (identifier "param_1") (, ",") (identifier "__dest") (, ",") (number_literal "0xffffffff") (, ",") (number_literal "0xffffffffffffffff") () ")"))) (; ";")) (expression_statement "FUN_00119825(uVar7,__dest);" (call_expression "FUN_00119825(uVar7,__dest)" (identifier "FUN_00119825") (argument_list "(uVar7,__dest)" (( "(") (identifier "uVar7") (, ",") (identifier "__dest") () ")"))) (; ";")) (expression_statement "uVar11 = 0;" (assignment_expression "uVar11 = 0" (identifier "uVar11") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "sqlite3_free(pvVar8);" (call_expression "sqlite3_free(pvVar8)" (identifier "sqlite3_free") (argument_list "(pvVar8)" (( "(") (identifier "pvVar8") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar11;" (return "return") (identifier "uVar11") (; ";")) (} "}")))

int function_1(type_1 *pCtx,type_2 *pRename,char *zSql,char *zNew,int var_5)

{
  type_3 var_15;
  type_4 *var_11;
  type_5 *pbVar3;
  type_3 uVar4;
  int var_7;
  type_3 var_8;
  type_3 var_14;
  type_6 *db;
  char *var_4;
  char *var_9;
  type_2 *pRVar8;
  type_4 *var_12;
  type_4 *var_13;
  int var_16;
  char *__src;
  
  uVar4 = var_1(zNew);
  var_7 = var_1(zSql);
  db = var_2(pCtx);
  var_4 = var_3(db,"\"%w\"",zNew);
  if (var_4 == (char *)0x0) {
    var_16 = 7;
  }
  else {
    var_8 = var_1(var_4);
    if (var_5 != 0) {
      zNew = var_4;
      uVar4 = var_8;
    }
    var_9 = (char *)var_6(db,(long)(int)(var_7 + 1 + var_8 * pRename->nList));
    var_16 = 7;
    if (var_9 != (char *)0x0) {
      var_10(var_9,zSql,(long)var_7);
      var_11 = pRename->pList;
      while (var_11 != (type_4 *)0x0) {
        var_12 = var_11->pNext;
        pRVar8 = pRename;
        var_13 = var_11;
        if (var_12 != (type_4 *)0x0) {
          do {
            if ((var_13->t).var_4 < (var_12->t).var_4) {
              var_13 = var_12;
            }
            var_12 = var_12->pNext;
          } while (var_12 != (type_4 *)0x0);
          if (var_13 != var_11) {
            do {
              var_12 = var_11;
              var_11 = var_12->pNext;
            } while (var_11 != var_13);
            pRVar8 = (type_2 *)&var_12->pNext;
          }
        }
        pRVar8->pList = var_13->pNext;
        pbVar3 = (type_5 *)(var_13->t).var_4;
        __src = var_4;
        var_15 = var_8;
        if ((""[*pbVar3] & 0x46) != 0) {
          __src = zNew;
          var_15 = uVar4;
        }
        var_16 = (int)pbVar3 - (int)zSql;
        var_14 = (var_13->t).n;
        if (var_14 != var_15) {
          var_14 = var_14 + var_16;
          var_17(var_9 + (var_15 + var_16),var_9 + var_14,(type_7)(var_7 - var_14));
          var_7 = (var_7 - (var_13->t).n) + var_15;
          var_9[var_7] = '\0';
        }
        var_10(var_9 + var_16,__src,(type_7)var_15);
        var_18(db,var_13);
        var_11 = pRename->pList;
      }
      var_19(pCtx,var_9,-1,(type_8 *)0xffffffffffffffff);
      var_18(db,var_9);
      var_16 = 0;
    }
    var_20(var_4);
  }
  return var_16;
}


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

undefined8 MASKED(undefined8 param_1,long *param_2,void *param_3,void *param_4,int param_5)

{
  uint uVar1;
  long lVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  undefined8 uVar7;
  void *pvVar8;
  void *__dest;
  long *plVar9;
  long lVar10;
  undefined8 uVar11;
  long lVar12;
  int iVar13;
  void *__src;
  
  uVar3 = FUN_0011572f(param_4);
  iVar4 = FUN_0011572f(param_3);
  uVar7 = sqlite3_context_db_handle(param_1);
  pvVar8 = (void *)FUN_00130001(uVar7,&DAT_0018f082,param_4);
  if (pvVar8 == (void *)0x0) {
    uVar11 = 7;
  }
  else {
    uVar5 = FUN_0011572f(pvVar8);
    if (param_5 != 0) {
      param_4 = pvVar8;
      uVar3 = uVar5;
    }
    __dest = (void *)FUN_001225e4(uVar7,(long)(int)(iVar4 + 1 + uVar5 * (int)param_2[1]));
    uVar11 = 7;
    if (__dest != (void *)0x0) {
      memcpy(__dest,param_3,(long)iVar4);
      lVar2 = *param_2;
      while (lVar2 != 0) {
        lVar10 = *(long *)(lVar2 + 0x18);
        plVar9 = param_2;
        lVar12 = lVar2;
        if (lVar10 != 0) {
          do {
            if (*(ulong *)(lVar12 + 8) < *(ulong *)(lVar10 + 8)) {
              lVar12 = lVar10;
            }
            lVar10 = *(long *)(lVar10 + 0x18);
          } while (lVar10 != 0);
          if (lVar12 != lVar2) {
            do {
              lVar10 = lVar2;
              lVar2 = *(long *)(lVar10 + 0x18);
            } while (lVar2 != lVar12);
            plVar9 = (long *)(lVar10 + 0x18);
          }
        }
        *plVar9 = *(long *)(lVar12 + 0x18);
        __src = pvVar8;
        uVar1 = uVar5;
        if (((&DAT_00196400)[**(byte **)(lVar12 + 8)] & 0x46) != 0) {
          __src = param_4;
          uVar1 = uVar3;
        }
        iVar13 = (int)*(byte **)(lVar12 + 8) - (int)param_3;
        if (*(uint *)(lVar12 + 0x10) != uVar1) {
          uVar6 = *(uint *)(lVar12 + 0x10) + iVar13;
          memmove((void *)((ulong)(uVar1 + iVar13) + (long)__dest),
                  (void *)((long)__dest + (ulong)uVar6),(ulong)(iVar4 - uVar6));
          iVar4 = (iVar4 - *(int *)(lVar12 + 0x10)) + uVar1;
          *(undefined1 *)((long)__dest + (long)iVar4) = 0;
        }
        memcpy((void *)((long)iVar13 + (long)__dest),__src,(ulong)uVar1);
        FUN_00119825(uVar7,lVar12);
        lVar2 = *param_2;
      }
      sqlite3_result_text(param_1,__dest,0xffffffff,0xffffffffffffffff);
      FUN_00119825(uVar7,__dest);
      uVar11 = 0;
    }
    sqlite3_free(pvVar8);
  }
  return uVar11;
}

