
/* DWARF original prototype: int fts3AppendToNode(Blob * pNode, Blob * pPrev, char * zTerm, int
   nTerm, char * aDoclist, int nDoclist, Blob * pNode) */

int fts3AppendToNode(Blob *pNode,Blob *pPrev,char *zTerm,int nTerm,char *aDoclist,int nDoclist,
                    Blob *pNode_1)

{
  char *__dest;
  byte bVar1;
  byte *pbVar2;
  ulong uVar3;
  int iVar4;
  size_t sVar5;
  int iVar6;
  undefined4 in_register_0000000c;
  char *pcVar7;
  byte *pbVar8;
  ulong uVar9;
  int iVar10;
  int iVar11;
  undefined4 in_register_0000008c;
  char *__src;
  long in_FS_OFFSET;
  int rc;
  long local_40;
  
  iVar11 = (int)aDoclist;
  pcVar7 = (char *)CONCAT44(in_register_0000000c,nTerm);
  iVar6 = *(int *)(zTerm + 8);
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  rc = 0;
  iVar4 = iVar6;
  if (*(int *)(zTerm + 0xc) < iVar11) {
    blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)
    ;
    iVar4 = rc;
    if (rc != 0) goto LAB_00136cee;
    iVar4 = *(int *)(zTerm + 8);
  }
  __dest = *(char **)zTerm;
  if ((iVar4 < 1) || (*__dest != *pcVar7)) {
    uVar9 = 0;
    __src = pcVar7;
    iVar10 = iVar11;
  }
  else {
    uVar3 = 1;
    do {
      uVar9 = uVar3;
      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;
      uVar3 = uVar9 + 1;
    } while (__dest[uVar9] == pcVar7[uVar9]);
    __src = pcVar7 + uVar9;
    iVar10 = iVar11 - (int)uVar9;
  }
  memcpy(__dest,pcVar7,(long)iVar11);
  *(int *)(zTerm + 8) = iVar11;
  if (iVar6 == 0) {
    iVar6 = *(int *)&pPrev->a;
  }
  else {
    iVar6 = *(int *)&pPrev->a;
    pcVar7 = pNode->a;
    pbVar2 = (byte *)(pcVar7 + iVar6);
    do {
      pbVar8 = pbVar2;
      bVar1 = (byte)uVar9;
      uVar9 = uVar9 >> 7;
      *pbVar8 = bVar1 | 0x80;
      pbVar2 = pbVar8 + 1;
    } while (uVar9 != 0);
    *pbVar8 = bVar1 & 0x7f;
    iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));
    *(int *)&pPrev->a = iVar6;
  }
  pcVar7 = pNode->a;
  sVar5 = (long)iVar10;
  pbVar2 = (byte *)(pcVar7 + iVar6);
  do {
    pbVar8 = pbVar2;
    bVar1 = (byte)sVar5;
    sVar5 = sVar5 >> 7;
    *pbVar8 = bVar1 | 0x80;
    pbVar2 = pbVar8 + 1;
  } while (sVar5 != 0);
  *pbVar8 = bVar1 & 0x7f;
  iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)) + *(int *)&pPrev->a;
  *(int *)&pPrev->a = iVar6;
  memcpy(pNode->a + iVar6,__src,(long)iVar10);
  iVar10 = iVar10 + *(int *)&pPrev->a;
  *(int *)&pPrev->a = iVar10;
  iVar4 = 0;
  if ((void *)CONCAT44(in_register_0000008c,nDoclist) != (void *)0x0) {
    pcVar7 = pNode->a;
    sVar5 = (long)(int)pNode_1;
    pbVar2 = (byte *)(pcVar7 + iVar10);
    do {
      pbVar8 = pbVar2;
      bVar1 = (byte)sVar5;
      sVar5 = sVar5 >> 7;
      *pbVar8 = bVar1 | 0x80;
      pbVar2 = pbVar8 + 1;
    } while (sVar5 != 0);
    *pbVar8 = bVar1 & 0x7f;
    iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a;
    *(int *)&pPrev->a = iVar6;
    memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1);
    *(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;
    iVar4 = 0;
  }
LAB_00136cee:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar4;
}



int FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,
                void *param_6,int param_7)

{
  char *__dest;
  long lVar1;
  byte bVar2;
  int iVar3;
  byte *pbVar4;
  ulong uVar5;
  int iVar6;
  size_t sVar7;
  int iVar8;
  ulong uVar9;
  byte *pbVar10;
  byte *pbVar11;
  char *__src;
  long in_FS_OFFSET;
  int local_44;
  long local_40;
  
  iVar8 = *(int *)(param_3 + 1);
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_44 = 0;
  iVar6 = iVar8;
  if (*(int *)((long)param_3 + 0xc) < param_5) {
    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);
    iVar6 = local_44;
    if (local_44 != 0) goto LAB_00136cee;
    iVar6 = *(int *)(param_3 + 1);
  }
  __dest = (char *)*param_3;
  if ((iVar6 < 1) || (*__dest != *param_4)) {
    uVar9 = 0;
    __src = param_4;
    iVar3 = param_5;
  }
  else {
    uVar5 = 1;
    do {
      uVar9 = uVar5;
      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;
      uVar5 = uVar9 + 1;
    } while (__dest[uVar9] == param_4[uVar9]);
    __src = param_4 + uVar9;
    iVar3 = param_5 - (int)uVar9;
  }
  memcpy(__dest,param_4,(long)param_5);
  *(int *)(param_3 + 1) = param_5;
  if (iVar8 == 0) {
    iVar8 = *param_2;
  }
  else {
    iVar8 = *param_2;
    lVar1 = *param_1;
    pbVar4 = (byte *)(iVar8 + lVar1);
    do {
      pbVar10 = pbVar4;
      bVar2 = (byte)uVar9;
      uVar9 = uVar9 >> 7;
      *pbVar10 = bVar2 | 0x80;
      pbVar4 = pbVar10 + 1;
    } while (uVar9 != 0);
    *pbVar10 = bVar2 & 0x7f;
    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));
    *param_2 = iVar8;
  }
  lVar1 = *param_1;
  sVar7 = (long)iVar3;
  pbVar4 = (byte *)(iVar8 + lVar1);
  do {
    pbVar10 = pbVar4;
    bVar2 = (byte)sVar7;
    sVar7 = sVar7 >> 7;
    *pbVar10 = bVar2 | 0x80;
    pbVar4 = pbVar10 + 1;
  } while (sVar7 != 0);
  *pbVar10 = bVar2 & 0x7f;
  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;
  *param_2 = iVar8;
  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);
  iVar8 = *param_2;
  *param_2 = iVar3 + iVar8;
  iVar6 = 0;
  if (param_6 != (void *)0x0) {
    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);
    sVar7 = (long)param_7;
    pbVar4 = pbVar10;
    do {
      pbVar11 = pbVar4;
      bVar2 = (byte)sVar7;
      sVar7 = sVar7 >> 7;
      *pbVar11 = bVar2 | 0x80;
      pbVar4 = pbVar11 + 1;
    } while (sVar7 != 0);
    *pbVar11 = bVar2 & 0x7f;
    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;
    *param_2 = iVar8;
    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);
    *param_2 = *param_2 + param_7;
    iVar6 = 0;
  }
LAB_00136cee:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar6;
}


PUSH R15
MOV R11,RDX
MOV R10,RCX
PUSH R14
MOV R14,RDI
PUSH R13
MOV R13,RSI
PUSH R12
MOV R12,R9
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV EBP,dword ptr [RDX + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x24],0x0
MOV EAX,EBP
CMP dword ptr [RDX + 0xc],R8D
JL 0x00136d60
MOV RDI,qword ptr [R11]
TEST EAX,EAX
JLE 0x00136db0
MOVZX EDX,byte ptr [R10]
CMP byte ptr [RDI],DL
JNZ 0x00136db0
LEA EDX,[RAX + -0x1]
MOV EBX,0x1
ADD RDX,0x1
JMP 0x00136be3
LEA RAX,[RBX + 0x1]
MOVZX ESI,byte ptr [R10 + RAX*0x1 + -0x1]
CMP byte ptr [RDI + RBX*0x1],SIL
JNZ 0x00136bee
MOV RBX,RAX
MOV ECX,EBX
LEA R15,[R10 + RBX*0x1]
CMP RDX,RBX
JNZ 0x00136bd0
MOV EAX,R8D
SUB EAX,ECX
MOV dword ptr [RSP + 0x8],EAX
MOVSXD RDX,R8D
MOV RSI,R10
MOV qword ptr [RSP + 0x18],R11
MOV dword ptr [RSP + 0x14],R8D
CALL 0x0010a240
MOV R8D,dword ptr [RSP + 0x14]
MOV R11,qword ptr [RSP + 0x18]
MOV dword ptr [R11 + 0x8],R8D
TEST EBP,EBP
JNZ 0x00136d18
MOV ESI,dword ptr [R13]
MOVSXD RDX,dword ptr [RSP + 0x8]
MOVSXD RSI,ESI
ADD RSI,qword ptr [R14]
MOV RDI,RSI
MOV RAX,RDX
JMP 0x00136c43
MOV RDI,RCX
MOV R8D,EAX
MOV R9D,EAX
LEA RCX,[RDI + 0x1]
OR R8D,0xffffff80
SHR RAX,0x7
MOV byte ptr [RCX + -0x1],R8B
JNZ 0x00136c40
AND R9D,0x7f
SUB RCX,RSI
MOV RSI,R15
MOV byte ptr [RDI],R9B
ADD ECX,dword ptr [R13]
MOV dword ptr [R13],ECX
MOV RDI,qword ptr [R14]
MOVSXD RCX,ECX
ADD RDI,RCX
CALL 0x0010a240
MOV EBP,dword ptr [RSP + 0x8]
ADD EBP,dword ptr [R13]
XOR EAX,EAX
MOV dword ptr [R13],EBP
TEST R12,R12
JZ 0x00136cee
MOVSXD RDX,dword ptr [RSP + 0x70]
MOVSXD RBP,EBP
ADD RBP,qword ptr [R14]
MOV RSI,RBP
MOV RAX,RDX
JMP 0x00136cab
MOV RSI,RCX
MOV EDI,EAX
MOV R8D,EAX
LEA RCX,[RSI + 0x1]
OR EDI,0xffffff80
SHR RAX,0x7
MOV byte ptr [RCX + -0x1],DIL
JNZ 0x00136ca8
AND R8D,0x7f
SUB RCX,RBP
MOV byte ptr [RSI],R8B
ADD ECX,dword ptr [R13]
MOV RSI,R12
MOV dword ptr [R13],ECX
MOV RDI,qword ptr [R14]
MOVSXD RCX,ECX
ADD RDI,RCX
CALL 0x0010a240
MOV EAX,dword ptr [RSP + 0x70]
ADD dword ptr [R13],EAX
XOR EAX,EAX
MOV RDX,qword ptr [RSP + 0x28]
XOR RDX,qword ptr FS:[0x28]
JNZ 0x00136dbf
ADD RSP,0x38
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOVSXD RDI,dword ptr [R13]
ADD RDI,qword ptr [R14]
MOV RDX,RDI
JMP 0x00136d2b
MOV RDX,RAX
MOV ECX,EBX
MOV ESI,EBX
LEA RAX,[RDX + 0x1]
OR ECX,0xffffff80
SHR RBX,0x7
MOV byte ptr [RAX + -0x1],CL
JNZ 0x00136d28
AND ESI,0x7f
SUB RAX,RDI
MOV byte ptr [RDX],SIL
MOV ESI,dword ptr [R13]
ADD ESI,EAX
MOV dword ptr [R13],ESI
JMP 0x00136c26
MOV qword ptr [RSP + 0x18],RCX
LEA RSI,[RDX + 0xc]
MOV RDI,R11
MOV EDX,R8D
LEA RCX,[RSP + 0x24]
MOV dword ptr [RSP + 0x14],R8D
MOV qword ptr [RSP + 0x8],R11
CALL 0x00136850
MOV EAX,dword ptr [RSP + 0x24]
MOV R11,qword ptr [RSP + 0x8]
MOV R8D,dword ptr [RSP + 0x14]
MOV R10,qword ptr [RSP + 0x18]
TEST EAX,EAX
JNZ 0x00136cee
MOV EAX,dword ptr [R11 + 0x8]
JMP 0x00136ba4
MOV R15,R10
MOV dword ptr [RSP + 0x8],R8D
XOR EBX,EBX
JMP 0x00136bf7
CALL 0x0010a140
(translation_unit "int FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)\n\n{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar6;\n}\n\n" (function_definition "int FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)\n\n{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar6;\n}" primitive_type (function_declarator "FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)" identifier (parameter_list "(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined8 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "void *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "int param_7" primitive_type identifier) ))) (compound_statement "{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar6;\n}" { (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "ulong uVar9;" type_identifier identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "byte *pbVar11;" type_identifier (pointer_declarator "*pbVar11" * identifier) ;) (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int local_44;" primitive_type identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar8 = *(int *)(param_3 + 1);" (assignment_expression "iVar8 = *(int *)(param_3 + 1)" identifier = (pointer_expression "*(int *)(param_3 + 1)" * (cast_expression "(int *)(param_3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) ))))) ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = iVar8;" (assignment_expression "iVar6 = iVar8" identifier = identifier) ;) (if_statement "if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }" if (parenthesized_expression "(*(int *)((long)param_3 + 0xc) < param_5)" ( (binary_expression "*(int *)((long)param_3 + 0xc) < param_5" (pointer_expression "*(int *)((long)param_3 + 0xc)" * (cast_expression "(int *)((long)param_3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_3 + 0xc)" ( (binary_expression "(long)param_3 + 0xc" (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) < identifier) )) (compound_statement "{\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }" { (expression_statement "FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);" (call_expression "FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44)" identifier (argument_list "(param_3,(long)param_3 + 0xc,param_5,&local_44)" ( identifier , (binary_expression "(long)param_3 + 0xc" (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) , identifier , (pointer_expression "&local_44" & identifier) ))) ;) (expression_statement "iVar6 = local_44;" (assignment_expression "iVar6 = local_44" identifier = identifier) ;) (if_statement "if (local_44 != 0) goto LAB_00136cee;" if (parenthesized_expression "(local_44 != 0)" ( (binary_expression "local_44 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00136cee;" goto statement_identifier ;)) (expression_statement "iVar6 = *(int *)(param_3 + 1);" (assignment_expression "iVar6 = *(int *)(param_3 + 1)" identifier = (pointer_expression "*(int *)(param_3 + 1)" * (cast_expression "(int *)(param_3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) ))))) ;) })) (expression_statement "__dest = (char *)*param_3;" (assignment_expression "__dest = (char *)*param_3" identifier = (cast_expression "(char *)*param_3" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (if_statement "if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" if (parenthesized_expression "((iVar6 < 1) || (*__dest != *param_4))" ( (binary_expression "(iVar6 < 1) || (*__dest != *param_4)" (parenthesized_expression "(iVar6 < 1)" ( (binary_expression "iVar6 < 1" identifier < number_literal) )) || (parenthesized_expression "(*__dest != *param_4)" ( (binary_expression "*__dest != *param_4" (pointer_expression "*__dest" * identifier) != (pointer_expression "*param_4" * identifier)) ))) )) (compound_statement "{\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }" { (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (expression_statement "__src = param_4;" (assignment_expression "__src = param_4" identifier = identifier) ;) (expression_statement "iVar3 = param_5;" (assignment_expression "iVar3 = param_5" identifier = identifier) ;) }) (else_clause "else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" else (compound_statement "{\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" { (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) (do_statement "do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);" do (compound_statement "{\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    }" { (expression_statement "uVar9 = uVar5;" (assignment_expression "uVar9 = uVar5" identifier = identifier) ;) (if_statement "if ((ulong)(iVar6 - 1) + 1 == uVar9) break;" if (parenthesized_expression "((ulong)(iVar6 - 1) + 1 == uVar9)" ( (binary_expression "(ulong)(iVar6 - 1) + 1 == uVar9" (binary_expression "(ulong)(iVar6 - 1) + 1" (call_expression "(ulong)(iVar6 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar6 - 1)" ( (binary_expression "iVar6 - 1" identifier - number_literal) ))) + number_literal) == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = uVar9 + 1;" (assignment_expression "uVar5 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(__dest[uVar9] == param_4[uVar9])" ( (binary_expression "__dest[uVar9] == param_4[uVar9]" (subscript_expression "__dest[uVar9]" identifier [ identifier ]) == (subscript_expression "param_4[uVar9]" identifier [ identifier ])) )) ;) (expression_statement "__src = param_4 + uVar9;" (assignment_expression "__src = param_4 + uVar9" identifier = (binary_expression "param_4 + uVar9" identifier + identifier)) ;) (expression_statement "iVar3 = param_5 - (int)uVar9;" (assignment_expression "iVar3 = param_5 - (int)uVar9" identifier = (binary_expression "param_5 - (int)uVar9" identifier - (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }))) (expression_statement "memcpy(__dest,param_4,(long)param_5);" (call_expression "memcpy(__dest,param_4,(long)param_5)" identifier (argument_list "(__dest,param_4,(long)param_5)" ( identifier , identifier , (cast_expression "(long)param_5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "*(int *)(param_3 + 1) = param_5;" (assignment_expression "*(int *)(param_3 + 1) = param_5" (pointer_expression "*(int *)(param_3 + 1)" * (cast_expression "(int *)(param_3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar8 = *param_2;\n  }" { (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) }) (else_clause "else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" else (compound_statement "{\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" { (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pbVar4 = (byte *)(iVar8 + lVar1);" (assignment_expression "pbVar4 = (byte *)(iVar8 + lVar1)" identifier = (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) )))) ;) (do_statement "do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);" do (compound_statement "{\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    }" { (expression_statement "pbVar10 = pbVar4;" (assignment_expression "pbVar10 = pbVar4" identifier = identifier) ;) (expression_statement "bVar2 = (byte)uVar9;" (assignment_expression "bVar2 = (byte)uVar9" identifier = (cast_expression "(byte)uVar9" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar9 = uVar9 >> 7;" (assignment_expression "uVar9 = uVar9 >> 7" identifier = (binary_expression "uVar9 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar10 = bVar2 | 0x80;" (assignment_expression "*pbVar10 = bVar2 | 0x80" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar4 = pbVar10 + 1;" (assignment_expression "pbVar4 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar9 != 0)" ( (binary_expression "uVar9 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar10 = bVar2 & 0x7f;" (assignment_expression "*pbVar10 = bVar2 & 0x7f" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));" (assignment_expression "iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" identifier = (binary_expression "*param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" (pointer_expression "*param_2" * identifier) + (parenthesized_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" ( (binary_expression "(int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)" (cast_expression "(int)(pbVar10 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar10 + 1)" ( (binary_expression "pbVar10 + 1" identifier + number_literal) ))) - (cast_expression "(int)(byte *)(iVar8 + lVar1)" ( (type_descriptor "int" primitive_type) ) (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) ))))) )))) ;) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" * identifier) = identifier) ;) }))) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "sVar7 = (long)iVar3;" (assignment_expression "sVar7 = (long)iVar3" identifier = (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "pbVar4 = (byte *)(iVar8 + lVar1);" (assignment_expression "pbVar4 = (byte *)(iVar8 + lVar1)" identifier = (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) )))) ;) (do_statement "do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);" do (compound_statement "{\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  }" { (expression_statement "pbVar10 = pbVar4;" (assignment_expression "pbVar10 = pbVar4" identifier = identifier) ;) (expression_statement "bVar2 = (byte)sVar7;" (assignment_expression "bVar2 = (byte)sVar7" identifier = (cast_expression "(byte)sVar7" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "sVar7 = sVar7 >> 7;" (assignment_expression "sVar7 = sVar7 >> 7" identifier = (binary_expression "sVar7 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar10 = bVar2 | 0x80;" (assignment_expression "*pbVar10 = bVar2 | 0x80" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar4 = pbVar10 + 1;" (assignment_expression "pbVar4 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(sVar7 != 0)" ( (binary_expression "sVar7 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar10 = bVar2 & 0x7f;" (assignment_expression "*pbVar10 = bVar2 & 0x7f" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;" (assignment_expression "iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2" identifier = (binary_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2" (parenthesized_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" ( (binary_expression "(int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)" (cast_expression "(int)(pbVar10 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar10 + 1)" ( (binary_expression "pbVar10 + 1" identifier + number_literal) ))) - (cast_expression "(int)(byte *)(iVar8 + lVar1)" ( (type_descriptor "int" primitive_type) ) (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) ))))) )) + (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);" (call_expression "memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3)" identifier (argument_list "((void *)(*param_1 + (long)iVar8),__src,(long)iVar3)" ( (cast_expression "(void *)(*param_1 + (long)iVar8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + (long)iVar8)" ( (binary_expression "*param_1 + (long)iVar8" (pointer_expression "*param_1" * identifier) + (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*param_2 = iVar3 + iVar8;" (assignment_expression "*param_2 = iVar3 + iVar8" (pointer_expression "*param_2" * identifier) = (binary_expression "iVar3 + iVar8" identifier + identifier)) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (if_statement "if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }" if (parenthesized_expression "(param_6 != (void *)0x0)" ( (binary_expression "param_6 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }" { (expression_statement "pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);" (assignment_expression "pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1)" identifier = (cast_expression "(byte *)((long)(iVar3 + iVar8) + *param_1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)(iVar3 + iVar8) + *param_1)" ( (binary_expression "(long)(iVar3 + iVar8) + *param_1" (cast_expression "(long)(iVar3 + iVar8)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar3 + iVar8)" ( (binary_expression "iVar3 + iVar8" identifier + identifier) ))) + (pointer_expression "*param_1" * identifier)) )))) ;) (expression_statement "sVar7 = (long)param_7;" (assignment_expression "sVar7 = (long)param_7" identifier = (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "pbVar4 = pbVar10;" (assignment_expression "pbVar4 = pbVar10" identifier = identifier) ;) (do_statement "do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);" do (compound_statement "{\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    }" { (expression_statement "pbVar11 = pbVar4;" (assignment_expression "pbVar11 = pbVar4" identifier = identifier) ;) (expression_statement "bVar2 = (byte)sVar7;" (assignment_expression "bVar2 = (byte)sVar7" identifier = (cast_expression "(byte)sVar7" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "sVar7 = sVar7 >> 7;" (assignment_expression "sVar7 = sVar7 >> 7" identifier = (binary_expression "sVar7 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar11 = bVar2 | 0x80;" (assignment_expression "*pbVar11 = bVar2 | 0x80" (pointer_expression "*pbVar11" * identifier) = (binary_expression "bVar2 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar4 = pbVar11 + 1;" (assignment_expression "pbVar4 = pbVar11 + 1" identifier = (binary_expression "pbVar11 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(sVar7 != 0)" ( (binary_expression "sVar7 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar11 = bVar2 & 0x7f;" (assignment_expression "*pbVar11 = bVar2 & 0x7f" (pointer_expression "*pbVar11" * identifier) = (binary_expression "bVar2 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;" (assignment_expression "iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2" identifier = (binary_expression "((int)(pbVar11 + 1) - (int)pbVar10) + *param_2" (parenthesized_expression "((int)(pbVar11 + 1) - (int)pbVar10)" ( (binary_expression "(int)(pbVar11 + 1) - (int)pbVar10" (cast_expression "(int)(pbVar11 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar11 + 1)" ( (binary_expression "pbVar11 + 1" identifier + number_literal) ))) - (cast_expression "(int)pbVar10" ( (type_descriptor "int" primitive_type) ) identifier)) )) + (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);" (call_expression "memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7)" identifier (argument_list "((void *)(*param_1 + (long)iVar8),param_6,(long)param_7)" ( (cast_expression "(void *)(*param_1 + (long)iVar8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + (long)iVar8)" ( (binary_expression "*param_1 + (long)iVar8" (pointer_expression "*param_1" * identifier) + (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , identifier , (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "*param_2 = *param_2 + param_7;" (assignment_expression "*param_2 = *param_2 + param_7" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 + param_7" (pointer_expression "*param_2" * identifier) + identifier)) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar6;" return identifier ;) })))
(translation_unit "/* DWARF original prototype: int fts3AppendToNode(Blob * pNode, Blob * pPrev, char * zTerm, int\n   nTerm, char * aDoclist, int nDoclist, Blob * pNode) */\n\nint fts3AppendToNode(Blob *pNode,Blob *pPrev,char *zTerm,int nTerm,char *aDoclist,int nDoclist,\n                    Blob *pNode_1)\n\n{\n  char *__dest;\n  byte bVar1;\n  byte *pbVar2;\n  ulong uVar3;\n  int iVar4;\n  size_t sVar5;\n  int iVar6;\n  undefined4 in_register_0000000c;\n  char *pcVar7;\n  byte *pbVar8;\n  ulong uVar9;\n  int iVar10;\n  int iVar11;\n  undefined4 in_register_0000008c;\n  char *__src;\n  long in_FS_OFFSET;\n  int rc;\n  long local_40;\n  \n  iVar11 = (int)aDoclist;\n  pcVar7 = (char *)CONCAT44(in_register_0000000c,nTerm);\n  iVar6 = *(int *)(zTerm + 8);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  rc = 0;\n  iVar4 = iVar6;\n  if (*(int *)(zTerm + 0xc) < iVar11) {\n    blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)\n    ;\n    iVar4 = rc;\n    if (rc != 0) goto LAB_00136cee;\n    iVar4 = *(int *)(zTerm + 8);\n  }\n  __dest = *(char **)zTerm;\n  if ((iVar4 < 1) || (*__dest != *pcVar7)) {\n    uVar9 = 0;\n    __src = pcVar7;\n    iVar10 = iVar11;\n  }\n  else {\n    uVar3 = 1;\n    do {\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    } while (__dest[uVar9] == pcVar7[uVar9]);\n    __src = pcVar7 + uVar9;\n    iVar10 = iVar11 - (int)uVar9;\n  }\n  memcpy(__dest,pcVar7,(long)iVar11);\n  *(int *)(zTerm + 8) = iVar11;\n  if (iVar6 == 0) {\n    iVar6 = *(int *)&pPrev->a;\n  }\n  else {\n    iVar6 = *(int *)&pPrev->a;\n    pcVar7 = pNode->a;\n    pbVar2 = (byte *)(pcVar7 + iVar6);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (uVar9 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));\n    *(int *)&pPrev->a = iVar6;\n  }\n  pcVar7 = pNode->a;\n  sVar5 = (long)iVar10;\n  pbVar2 = (byte *)(pcVar7 + iVar6);\n  do {\n    pbVar8 = pbVar2;\n    bVar1 = (byte)sVar5;\n    sVar5 = sVar5 >> 7;\n    *pbVar8 = bVar1 | 0x80;\n    pbVar2 = pbVar8 + 1;\n  } while (sVar5 != 0);\n  *pbVar8 = bVar1 & 0x7f;\n  iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)) + *(int *)&pPrev->a;\n  *(int *)&pPrev->a = iVar6;\n  memcpy(pNode->a + iVar6,__src,(long)iVar10);\n  iVar10 = iVar10 + *(int *)&pPrev->a;\n  *(int *)&pPrev->a = iVar10;\n  iVar4 = 0;\n  if ((void *)CONCAT44(in_register_0000008c,nDoclist) != (void *)0x0) {\n    pcVar7 = pNode->a;\n    sVar5 = (long)(int)pNode_1;\n    pbVar2 = (byte *)(pcVar7 + iVar10);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)sVar5;\n      sVar5 = sVar5 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (sVar5 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a;\n    *(int *)&pPrev->a = iVar6;\n    memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1);\n    *(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;\n    iVar4 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int fts3AppendToNode(Blob *pNode,Blob *pPrev,char *zTerm,int nTerm,char *aDoclist,int nDoclist,\n                    Blob *pNode_1)\n\n{\n  char *__dest;\n  byte bVar1;\n  byte *pbVar2;\n  ulong uVar3;\n  int iVar4;\n  size_t sVar5;\n  int iVar6;\n  undefined4 in_register_0000000c;\n  char *pcVar7;\n  byte *pbVar8;\n  ulong uVar9;\n  int iVar10;\n  int iVar11;\n  undefined4 in_register_0000008c;\n  char *__src;\n  long in_FS_OFFSET;\n  int rc;\n  long local_40;\n  \n  iVar11 = (int)aDoclist;\n  pcVar7 = (char *)CONCAT44(in_register_0000000c,nTerm);\n  iVar6 = *(int *)(zTerm + 8);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  rc = 0;\n  iVar4 = iVar6;\n  if (*(int *)(zTerm + 0xc) < iVar11) {\n    blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)\n    ;\n    iVar4 = rc;\n    if (rc != 0) goto LAB_00136cee;\n    iVar4 = *(int *)(zTerm + 8);\n  }\n  __dest = *(char **)zTerm;\n  if ((iVar4 < 1) || (*__dest != *pcVar7)) {\n    uVar9 = 0;\n    __src = pcVar7;\n    iVar10 = iVar11;\n  }\n  else {\n    uVar3 = 1;\n    do {\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    } while (__dest[uVar9] == pcVar7[uVar9]);\n    __src = pcVar7 + uVar9;\n    iVar10 = iVar11 - (int)uVar9;\n  }\n  memcpy(__dest,pcVar7,(long)iVar11);\n  *(int *)(zTerm + 8) = iVar11;\n  if (iVar6 == 0) {\n    iVar6 = *(int *)&pPrev->a;\n  }\n  else {\n    iVar6 = *(int *)&pPrev->a;\n    pcVar7 = pNode->a;\n    pbVar2 = (byte *)(pcVar7 + iVar6);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (uVar9 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));\n    *(int *)&pPrev->a = iVar6;\n  }\n  pcVar7 = pNode->a;\n  sVar5 = (long)iVar10;\n  pbVar2 = (byte *)(pcVar7 + iVar6);\n  do {\n    pbVar8 = pbVar2;\n    bVar1 = (byte)sVar5;\n    sVar5 = sVar5 >> 7;\n    *pbVar8 = bVar1 | 0x80;\n    pbVar2 = pbVar8 + 1;\n  } while (sVar5 != 0);\n  *pbVar8 = bVar1 & 0x7f;\n  iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)) + *(int *)&pPrev->a;\n  *(int *)&pPrev->a = iVar6;\n  memcpy(pNode->a + iVar6,__src,(long)iVar10);\n  iVar10 = iVar10 + *(int *)&pPrev->a;\n  *(int *)&pPrev->a = iVar10;\n  iVar4 = 0;\n  if ((void *)CONCAT44(in_register_0000008c,nDoclist) != (void *)0x0) {\n    pcVar7 = pNode->a;\n    sVar5 = (long)(int)pNode_1;\n    pbVar2 = (byte *)(pcVar7 + iVar10);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)sVar5;\n      sVar5 = sVar5 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (sVar5 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a;\n    *(int *)&pPrev->a = iVar6;\n    memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1);\n    *(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;\n    iVar4 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar4;\n}" primitive_type (function_declarator "fts3AppendToNode(Blob *pNode,Blob *pPrev,char *zTerm,int nTerm,char *aDoclist,int nDoclist,\n                    Blob *pNode_1)" identifier (parameter_list "(Blob *pNode,Blob *pPrev,char *zTerm,int nTerm,char *aDoclist,int nDoclist,\n                    Blob *pNode_1)" ( (parameter_declaration "Blob *pNode" type_identifier (pointer_declarator "*pNode" * identifier)) , (parameter_declaration "Blob *pPrev" type_identifier (pointer_declarator "*pPrev" * identifier)) , (parameter_declaration "char *zTerm" primitive_type (pointer_declarator "*zTerm" * identifier)) , (parameter_declaration "int nTerm" primitive_type identifier) , (parameter_declaration "char *aDoclist" primitive_type (pointer_declarator "*aDoclist" * identifier)) , (parameter_declaration "int nDoclist" primitive_type identifier) , (parameter_declaration "Blob *pNode_1" type_identifier (pointer_declarator "*pNode_1" * identifier)) ))) (compound_statement "{\n  char *__dest;\n  byte bVar1;\n  byte *pbVar2;\n  ulong uVar3;\n  int iVar4;\n  size_t sVar5;\n  int iVar6;\n  undefined4 in_register_0000000c;\n  char *pcVar7;\n  byte *pbVar8;\n  ulong uVar9;\n  int iVar10;\n  int iVar11;\n  undefined4 in_register_0000008c;\n  char *__src;\n  long in_FS_OFFSET;\n  int rc;\n  long local_40;\n  \n  iVar11 = (int)aDoclist;\n  pcVar7 = (char *)CONCAT44(in_register_0000000c,nTerm);\n  iVar6 = *(int *)(zTerm + 8);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  rc = 0;\n  iVar4 = iVar6;\n  if (*(int *)(zTerm + 0xc) < iVar11) {\n    blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)\n    ;\n    iVar4 = rc;\n    if (rc != 0) goto LAB_00136cee;\n    iVar4 = *(int *)(zTerm + 8);\n  }\n  __dest = *(char **)zTerm;\n  if ((iVar4 < 1) || (*__dest != *pcVar7)) {\n    uVar9 = 0;\n    __src = pcVar7;\n    iVar10 = iVar11;\n  }\n  else {\n    uVar3 = 1;\n    do {\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    } while (__dest[uVar9] == pcVar7[uVar9]);\n    __src = pcVar7 + uVar9;\n    iVar10 = iVar11 - (int)uVar9;\n  }\n  memcpy(__dest,pcVar7,(long)iVar11);\n  *(int *)(zTerm + 8) = iVar11;\n  if (iVar6 == 0) {\n    iVar6 = *(int *)&pPrev->a;\n  }\n  else {\n    iVar6 = *(int *)&pPrev->a;\n    pcVar7 = pNode->a;\n    pbVar2 = (byte *)(pcVar7 + iVar6);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (uVar9 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));\n    *(int *)&pPrev->a = iVar6;\n  }\n  pcVar7 = pNode->a;\n  sVar5 = (long)iVar10;\n  pbVar2 = (byte *)(pcVar7 + iVar6);\n  do {\n    pbVar8 = pbVar2;\n    bVar1 = (byte)sVar5;\n    sVar5 = sVar5 >> 7;\n    *pbVar8 = bVar1 | 0x80;\n    pbVar2 = pbVar8 + 1;\n  } while (sVar5 != 0);\n  *pbVar8 = bVar1 & 0x7f;\n  iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)) + *(int *)&pPrev->a;\n  *(int *)&pPrev->a = iVar6;\n  memcpy(pNode->a + iVar6,__src,(long)iVar10);\n  iVar10 = iVar10 + *(int *)&pPrev->a;\n  *(int *)&pPrev->a = iVar10;\n  iVar4 = 0;\n  if ((void *)CONCAT44(in_register_0000008c,nDoclist) != (void *)0x0) {\n    pcVar7 = pNode->a;\n    sVar5 = (long)(int)pNode_1;\n    pbVar2 = (byte *)(pcVar7 + iVar10);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)sVar5;\n      sVar5 = sVar5 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (sVar5 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a;\n    *(int *)&pPrev->a = iVar6;\n    memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1);\n    *(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;\n    iVar4 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar4;\n}" { (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 in_register_0000000c;" type_identifier identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "ulong uVar9;" type_identifier identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "undefined4 in_register_0000008c;" type_identifier identifier ;) (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int rc;" primitive_type identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar11 = (int)aDoclist;" (assignment_expression "iVar11 = (int)aDoclist" identifier = (cast_expression "(int)aDoclist" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pcVar7 = (char *)CONCAT44(in_register_0000000c,nTerm);" (assignment_expression "pcVar7 = (char *)CONCAT44(in_register_0000000c,nTerm)" identifier = (cast_expression "(char *)CONCAT44(in_register_0000000c,nTerm)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "CONCAT44(in_register_0000000c,nTerm)" identifier (argument_list "(in_register_0000000c,nTerm)" ( identifier , identifier ))))) ;) (expression_statement "iVar6 = *(int *)(zTerm + 8);" (assignment_expression "iVar6 = *(int *)(zTerm + 8)" identifier = (pointer_expression "*(int *)(zTerm + 8)" * (cast_expression "(int *)(zTerm + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(zTerm + 8)" ( (binary_expression "zTerm + 8" identifier + number_literal) ))))) ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "rc = 0;" (assignment_expression "rc = 0" identifier = number_literal) ;) (expression_statement "iVar4 = iVar6;" (assignment_expression "iVar4 = iVar6" identifier = identifier) ;) (if_statement "if (*(int *)(zTerm + 0xc) < iVar11) {\n    blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)\n    ;\n    iVar4 = rc;\n    if (rc != 0) goto LAB_00136cee;\n    iVar4 = *(int *)(zTerm + 8);\n  }" if (parenthesized_expression "(*(int *)(zTerm + 0xc) < iVar11)" ( (binary_expression "*(int *)(zTerm + 0xc) < iVar11" (pointer_expression "*(int *)(zTerm + 0xc)" * (cast_expression "(int *)(zTerm + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(zTerm + 0xc)" ( (binary_expression "zTerm + 0xc" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)\n    ;\n    iVar4 = rc;\n    if (rc != 0) goto LAB_00136cee;\n    iVar4 = *(int *)(zTerm + 8);\n  }" { (expression_statement "blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)\n    ;" (call_expression "blobGrowBuffer((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)" identifier (argument_list "((Blob *)zTerm,(int)zTerm + 0xc,(int *)((ulong)aDoclist & 0xffffffff),(Blob *)&rc)" ( (cast_expression "(Blob *)zTerm" ( (type_descriptor "Blob *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "(int)zTerm + 0xc" (cast_expression "(int)zTerm" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , (cast_expression "(int *)((ulong)aDoclist & 0xffffffff)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)aDoclist & 0xffffffff)" ( (binary_expression "(ulong)aDoclist & 0xffffffff" (cast_expression "(ulong)aDoclist" ( (type_descriptor "ulong" type_identifier) ) identifier) & number_literal) ))) , (cast_expression "(Blob *)&rc" ( (type_descriptor "Blob *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&rc" & identifier)) ))) ;) (expression_statement "iVar4 = rc;" (assignment_expression "iVar4 = rc" identifier = identifier) ;) (if_statement "if (rc != 0) goto LAB_00136cee;" if (parenthesized_expression "(rc != 0)" ( (binary_expression "rc != 0" identifier != number_literal) )) (goto_statement "goto LAB_00136cee;" goto statement_identifier ;)) (expression_statement "iVar4 = *(int *)(zTerm + 8);" (assignment_expression "iVar4 = *(int *)(zTerm + 8)" identifier = (pointer_expression "*(int *)(zTerm + 8)" * (cast_expression "(int *)(zTerm + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(zTerm + 8)" ( (binary_expression "zTerm + 8" identifier + number_literal) ))))) ;) })) (expression_statement "__dest = *(char **)zTerm;" (assignment_expression "__dest = *(char **)zTerm" identifier = (pointer_expression "*(char **)zTerm" * (cast_expression "(char **)zTerm" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if ((iVar4 < 1) || (*__dest != *pcVar7)) {\n    uVar9 = 0;\n    __src = pcVar7;\n    iVar10 = iVar11;\n  }\n  else {\n    uVar3 = 1;\n    do {\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    } while (__dest[uVar9] == pcVar7[uVar9]);\n    __src = pcVar7 + uVar9;\n    iVar10 = iVar11 - (int)uVar9;\n  }" if (parenthesized_expression "((iVar4 < 1) || (*__dest != *pcVar7))" ( (binary_expression "(iVar4 < 1) || (*__dest != *pcVar7)" (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) || (parenthesized_expression "(*__dest != *pcVar7)" ( (binary_expression "*__dest != *pcVar7" (pointer_expression "*__dest" * identifier) != (pointer_expression "*pcVar7" * identifier)) ))) )) (compound_statement "{\n    uVar9 = 0;\n    __src = pcVar7;\n    iVar10 = iVar11;\n  }" { (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (expression_statement "__src = pcVar7;" (assignment_expression "__src = pcVar7" identifier = identifier) ;) (expression_statement "iVar10 = iVar11;" (assignment_expression "iVar10 = iVar11" identifier = identifier) ;) }) (else_clause "else {\n    uVar3 = 1;\n    do {\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    } while (__dest[uVar9] == pcVar7[uVar9]);\n    __src = pcVar7 + uVar9;\n    iVar10 = iVar11 - (int)uVar9;\n  }" else (compound_statement "{\n    uVar3 = 1;\n    do {\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    } while (__dest[uVar9] == pcVar7[uVar9]);\n    __src = pcVar7 + uVar9;\n    iVar10 = iVar11 - (int)uVar9;\n  }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (do_statement "do {\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    } while (__dest[uVar9] == pcVar7[uVar9]);" do (compound_statement "{\n      uVar9 = uVar3;\n      if ((ulong)(iVar4 - 1) + 1 == uVar9) break;\n      uVar3 = uVar9 + 1;\n    }" { (expression_statement "uVar9 = uVar3;" (assignment_expression "uVar9 = uVar3" identifier = identifier) ;) (if_statement "if ((ulong)(iVar4 - 1) + 1 == uVar9) break;" if (parenthesized_expression "((ulong)(iVar4 - 1) + 1 == uVar9)" ( (binary_expression "(ulong)(iVar4 - 1) + 1 == uVar9" (binary_expression "(ulong)(iVar4 - 1) + 1" (call_expression "(ulong)(iVar4 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar4 - 1)" ( (binary_expression "iVar4 - 1" identifier - number_literal) ))) + number_literal) == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar3 = uVar9 + 1;" (assignment_expression "uVar3 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(__dest[uVar9] == pcVar7[uVar9])" ( (binary_expression "__dest[uVar9] == pcVar7[uVar9]" (subscript_expression "__dest[uVar9]" identifier [ identifier ]) == (subscript_expression "pcVar7[uVar9]" identifier [ identifier ])) )) ;) (expression_statement "__src = pcVar7 + uVar9;" (assignment_expression "__src = pcVar7 + uVar9" identifier = (binary_expression "pcVar7 + uVar9" identifier + identifier)) ;) (expression_statement "iVar10 = iVar11 - (int)uVar9;" (assignment_expression "iVar10 = iVar11 - (int)uVar9" identifier = (binary_expression "iVar11 - (int)uVar9" identifier - (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }))) (expression_statement "memcpy(__dest,pcVar7,(long)iVar11);" (call_expression "memcpy(__dest,pcVar7,(long)iVar11)" identifier (argument_list "(__dest,pcVar7,(long)iVar11)" ( identifier , identifier , (cast_expression "(long)iVar11" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "*(int *)(zTerm + 8) = iVar11;" (assignment_expression "*(int *)(zTerm + 8) = iVar11" (pointer_expression "*(int *)(zTerm + 8)" * (cast_expression "(int *)(zTerm + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(zTerm + 8)" ( (binary_expression "zTerm + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar6 == 0) {\n    iVar6 = *(int *)&pPrev->a;\n  }\n  else {\n    iVar6 = *(int *)&pPrev->a;\n    pcVar7 = pNode->a;\n    pbVar2 = (byte *)(pcVar7 + iVar6);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (uVar9 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));\n    *(int *)&pPrev->a = iVar6;\n  }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar6 = *(int *)&pPrev->a;\n  }" { (expression_statement "iVar6 = *(int *)&pPrev->a;" (assignment_expression "iVar6 = *(int *)&pPrev->a" identifier = (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier))))) ;) }) (else_clause "else {\n    iVar6 = *(int *)&pPrev->a;\n    pcVar7 = pNode->a;\n    pbVar2 = (byte *)(pcVar7 + iVar6);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (uVar9 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));\n    *(int *)&pPrev->a = iVar6;\n  }" else (compound_statement "{\n    iVar6 = *(int *)&pPrev->a;\n    pcVar7 = pNode->a;\n    pbVar2 = (byte *)(pcVar7 + iVar6);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (uVar9 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));\n    *(int *)&pPrev->a = iVar6;\n  }" { (expression_statement "iVar6 = *(int *)&pPrev->a;" (assignment_expression "iVar6 = *(int *)&pPrev->a" identifier = (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier))))) ;) (expression_statement "pcVar7 = pNode->a;" (assignment_expression "pcVar7 = pNode->a" identifier = (field_expression "pNode->a" identifier -> field_identifier)) ;) (expression_statement "pbVar2 = (byte *)(pcVar7 + iVar6);" (assignment_expression "pbVar2 = (byte *)(pcVar7 + iVar6)" identifier = (cast_expression "(byte *)(pcVar7 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar7 + iVar6)" ( (binary_expression "pcVar7 + iVar6" identifier + identifier) )))) ;) (do_statement "do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (uVar9 != 0);" do (compound_statement "{\n      pbVar8 = pbVar2;\n      bVar1 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    }" { (expression_statement "pbVar8 = pbVar2;" (assignment_expression "pbVar8 = pbVar2" identifier = identifier) ;) (expression_statement "bVar1 = (byte)uVar9;" (assignment_expression "bVar1 = (byte)uVar9" identifier = (cast_expression "(byte)uVar9" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar9 = uVar9 >> 7;" (assignment_expression "uVar9 = uVar9 >> 7" identifier = (binary_expression "uVar9 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar8 = bVar1 | 0x80;" (assignment_expression "*pbVar8 = bVar1 | 0x80" (pointer_expression "*pbVar8" * identifier) = (binary_expression "bVar1 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar2 = pbVar8 + 1;" (assignment_expression "pbVar2 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar9 != 0)" ( (binary_expression "uVar9 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar8 = bVar1 & 0x7f;" (assignment_expression "*pbVar8 = bVar1 & 0x7f" (pointer_expression "*pbVar8" * identifier) = (binary_expression "bVar1 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6));" (assignment_expression "iVar6 = *(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6))" identifier = (binary_expression "*(int *)&pPrev->a + ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6))" (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))) + (parenthesized_expression "((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6))" ( (binary_expression "(int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)" (cast_expression "(int)(pbVar8 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar8 + 1)" ( (binary_expression "pbVar8 + 1" identifier + number_literal) ))) - (cast_expression "(int)(pcVar7 + iVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pcVar7 + iVar6)" ( (binary_expression "pcVar7 + iVar6" identifier + identifier) )))) )))) ;) (expression_statement "*(int *)&pPrev->a = iVar6;" (assignment_expression "*(int *)&pPrev->a = iVar6" (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))) = identifier) ;) }))) (expression_statement "pcVar7 = pNode->a;" (assignment_expression "pcVar7 = pNode->a" identifier = (field_expression "pNode->a" identifier -> field_identifier)) ;) (expression_statement "sVar5 = (long)iVar10;" (assignment_expression "sVar5 = (long)iVar10" identifier = (cast_expression "(long)iVar10" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "pbVar2 = (byte *)(pcVar7 + iVar6);" (assignment_expression "pbVar2 = (byte *)(pcVar7 + iVar6)" identifier = (cast_expression "(byte *)(pcVar7 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar7 + iVar6)" ( (binary_expression "pcVar7 + iVar6" identifier + identifier) )))) ;) (do_statement "do {\n    pbVar8 = pbVar2;\n    bVar1 = (byte)sVar5;\n    sVar5 = sVar5 >> 7;\n    *pbVar8 = bVar1 | 0x80;\n    pbVar2 = pbVar8 + 1;\n  } while (sVar5 != 0);" do (compound_statement "{\n    pbVar8 = pbVar2;\n    bVar1 = (byte)sVar5;\n    sVar5 = sVar5 >> 7;\n    *pbVar8 = bVar1 | 0x80;\n    pbVar2 = pbVar8 + 1;\n  }" { (expression_statement "pbVar8 = pbVar2;" (assignment_expression "pbVar8 = pbVar2" identifier = identifier) ;) (expression_statement "bVar1 = (byte)sVar5;" (assignment_expression "bVar1 = (byte)sVar5" identifier = (cast_expression "(byte)sVar5" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "sVar5 = sVar5 >> 7;" (assignment_expression "sVar5 = sVar5 >> 7" identifier = (binary_expression "sVar5 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar8 = bVar1 | 0x80;" (assignment_expression "*pbVar8 = bVar1 | 0x80" (pointer_expression "*pbVar8" * identifier) = (binary_expression "bVar1 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar2 = pbVar8 + 1;" (assignment_expression "pbVar2 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar8 = bVar1 & 0x7f;" (assignment_expression "*pbVar8 = bVar1 & 0x7f" (pointer_expression "*pbVar8" * identifier) = (binary_expression "bVar1 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)) + *(int *)&pPrev->a;" (assignment_expression "iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)) + *(int *)&pPrev->a" identifier = (binary_expression "((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)) + *(int *)&pPrev->a" (parenthesized_expression "((int)(pbVar8 + 1) - (int)(pcVar7 + iVar6))" ( (binary_expression "(int)(pbVar8 + 1) - (int)(pcVar7 + iVar6)" (cast_expression "(int)(pbVar8 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar8 + 1)" ( (binary_expression "pbVar8 + 1" identifier + number_literal) ))) - (cast_expression "(int)(pcVar7 + iVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pcVar7 + iVar6)" ( (binary_expression "pcVar7 + iVar6" identifier + identifier) )))) )) + (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))))) ;) (expression_statement "*(int *)&pPrev->a = iVar6;" (assignment_expression "*(int *)&pPrev->a = iVar6" (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))) = identifier) ;) (expression_statement "memcpy(pNode->a + iVar6,__src,(long)iVar10);" (call_expression "memcpy(pNode->a + iVar6,__src,(long)iVar10)" identifier (argument_list "(pNode->a + iVar6,__src,(long)iVar10)" ( (binary_expression "pNode->a + iVar6" (field_expression "pNode->a" identifier -> field_identifier) + identifier) , identifier , (cast_expression "(long)iVar10" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "iVar10 = iVar10 + *(int *)&pPrev->a;" (assignment_expression "iVar10 = iVar10 + *(int *)&pPrev->a" identifier = (binary_expression "iVar10 + *(int *)&pPrev->a" identifier + (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))))) ;) (expression_statement "*(int *)&pPrev->a = iVar10;" (assignment_expression "*(int *)&pPrev->a = iVar10" (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if ((void *)CONCAT44(in_register_0000008c,nDoclist) != (void *)0x0) {\n    pcVar7 = pNode->a;\n    sVar5 = (long)(int)pNode_1;\n    pbVar2 = (byte *)(pcVar7 + iVar10);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)sVar5;\n      sVar5 = sVar5 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (sVar5 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a;\n    *(int *)&pPrev->a = iVar6;\n    memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1);\n    *(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;\n    iVar4 = 0;\n  }" if (parenthesized_expression "((void *)CONCAT44(in_register_0000008c,nDoclist) != (void *)0x0)" ( (binary_expression "(void *)CONCAT44(in_register_0000008c,nDoclist) != (void *)0x0" (cast_expression "(void *)CONCAT44(in_register_0000008c,nDoclist)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "CONCAT44(in_register_0000008c,nDoclist)" identifier (argument_list "(in_register_0000008c,nDoclist)" ( identifier , identifier )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar7 = pNode->a;\n    sVar5 = (long)(int)pNode_1;\n    pbVar2 = (byte *)(pcVar7 + iVar10);\n    do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)sVar5;\n      sVar5 = sVar5 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (sVar5 != 0);\n    *pbVar8 = bVar1 & 0x7f;\n    iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a;\n    *(int *)&pPrev->a = iVar6;\n    memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1);\n    *(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;\n    iVar4 = 0;\n  }" { (expression_statement "pcVar7 = pNode->a;" (assignment_expression "pcVar7 = pNode->a" identifier = (field_expression "pNode->a" identifier -> field_identifier)) ;) (expression_statement "sVar5 = (long)(int)pNode_1;" (assignment_expression "sVar5 = (long)(int)pNode_1" identifier = (cast_expression "(long)(int)pNode_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)pNode_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "pbVar2 = (byte *)(pcVar7 + iVar10);" (assignment_expression "pbVar2 = (byte *)(pcVar7 + iVar10)" identifier = (cast_expression "(byte *)(pcVar7 + iVar10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar7 + iVar10)" ( (binary_expression "pcVar7 + iVar10" identifier + identifier) )))) ;) (do_statement "do {\n      pbVar8 = pbVar2;\n      bVar1 = (byte)sVar5;\n      sVar5 = sVar5 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    } while (sVar5 != 0);" do (compound_statement "{\n      pbVar8 = pbVar2;\n      bVar1 = (byte)sVar5;\n      sVar5 = sVar5 >> 7;\n      *pbVar8 = bVar1 | 0x80;\n      pbVar2 = pbVar8 + 1;\n    }" { (expression_statement "pbVar8 = pbVar2;" (assignment_expression "pbVar8 = pbVar2" identifier = identifier) ;) (expression_statement "bVar1 = (byte)sVar5;" (assignment_expression "bVar1 = (byte)sVar5" identifier = (cast_expression "(byte)sVar5" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "sVar5 = sVar5 >> 7;" (assignment_expression "sVar5 = sVar5 >> 7" identifier = (binary_expression "sVar5 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar8 = bVar1 | 0x80;" (assignment_expression "*pbVar8 = bVar1 | 0x80" (pointer_expression "*pbVar8" * identifier) = (binary_expression "bVar1 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar2 = pbVar8 + 1;" (assignment_expression "pbVar2 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar8 = bVar1 & 0x7f;" (assignment_expression "*pbVar8 = bVar1 & 0x7f" (pointer_expression "*pbVar8" * identifier) = (binary_expression "bVar1 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a;" (assignment_expression "iVar6 = ((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a" identifier = (binary_expression "((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)) + *(int *)&pPrev->a" (parenthesized_expression "((int)(pbVar8 + 1) - (int)(pcVar7 + iVar10))" ( (binary_expression "(int)(pbVar8 + 1) - (int)(pcVar7 + iVar10)" (cast_expression "(int)(pbVar8 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar8 + 1)" ( (binary_expression "pbVar8 + 1" identifier + number_literal) ))) - (cast_expression "(int)(pcVar7 + iVar10)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pcVar7 + iVar10)" ( (binary_expression "pcVar7 + iVar10" identifier + identifier) )))) )) + (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))))) ;) (expression_statement "*(int *)&pPrev->a = iVar6;" (assignment_expression "*(int *)&pPrev->a = iVar6" (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))) = identifier) ;) (expression_statement "memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1);" (call_expression "memcpy(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1)" identifier (argument_list "(pNode->a + iVar6,(void *)CONCAT44(in_register_0000008c,nDoclist),(long)(int)pNode_1)" ( (binary_expression "pNode->a + iVar6" (field_expression "pNode->a" identifier -> field_identifier) + identifier) , (cast_expression "(void *)CONCAT44(in_register_0000008c,nDoclist)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "CONCAT44(in_register_0000008c,nDoclist)" identifier (argument_list "(in_register_0000008c,nDoclist)" ( identifier , identifier )))) , (cast_expression "(long)(int)pNode_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)pNode_1" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (expression_statement "*(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;" (assignment_expression "*(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1" (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))) = (binary_expression "*(int *)&pPrev->a + (int)pNode_1" (pointer_expression "*(int *)&pPrev->a" * (cast_expression "(int *)&pPrev->a" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pPrev->a" & (field_expression "pPrev->a" identifier -> field_identifier)))) + (cast_expression "(int)pNode_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)\n\n{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar6;\n}\n\n" (function_definition "int FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)\n\n{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar6;\n}" primitive_type (function_declarator "FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)" identifier (parameter_list "(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined8 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "void *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "int param_7" primitive_type identifier) ))) (compound_statement "{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar6;\n}" { (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "ulong uVar9;" type_identifier identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "byte *pbVar11;" type_identifier (pointer_declarator "*pbVar11" * identifier) ;) (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int local_44;" primitive_type identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar8 = *(int *)(param_3 + 1);" (assignment_expression "iVar8 = *(int *)(param_3 + 1)" identifier = (pointer_expression "*(int *)(param_3 + 1)" * (cast_expression "(int *)(param_3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) ))))) ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = iVar8;" (assignment_expression "iVar6 = iVar8" identifier = identifier) ;) (if_statement "if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }" if (parenthesized_expression "(*(int *)((long)param_3 + 0xc) < param_5)" ( (binary_expression "*(int *)((long)param_3 + 0xc) < param_5" (pointer_expression "*(int *)((long)param_3 + 0xc)" * (cast_expression "(int *)((long)param_3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_3 + 0xc)" ( (binary_expression "(long)param_3 + 0xc" (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) < identifier) )) (compound_statement "{\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }" { (expression_statement "FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);" (call_expression "FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44)" identifier (argument_list "(param_3,(long)param_3 + 0xc,param_5,&local_44)" ( identifier , (binary_expression "(long)param_3 + 0xc" (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) , identifier , (pointer_expression "&local_44" & identifier) ))) ;) (expression_statement "iVar6 = local_44;" (assignment_expression "iVar6 = local_44" identifier = identifier) ;) (if_statement "if (local_44 != 0) goto LAB_00136cee;" if (parenthesized_expression "(local_44 != 0)" ( (binary_expression "local_44 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00136cee;" goto statement_identifier ;)) (expression_statement "iVar6 = *(int *)(param_3 + 1);" (assignment_expression "iVar6 = *(int *)(param_3 + 1)" identifier = (pointer_expression "*(int *)(param_3 + 1)" * (cast_expression "(int *)(param_3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) ))))) ;) })) (expression_statement "__dest = (char *)*param_3;" (assignment_expression "__dest = (char *)*param_3" identifier = (cast_expression "(char *)*param_3" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) ;) (if_statement "if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" if (parenthesized_expression "((iVar6 < 1) || (*__dest != *param_4))" ( (binary_expression "(iVar6 < 1) || (*__dest != *param_4)" (parenthesized_expression "(iVar6 < 1)" ( (binary_expression "iVar6 < 1" identifier < number_literal) )) || (parenthesized_expression "(*__dest != *param_4)" ( (binary_expression "*__dest != *param_4" (pointer_expression "*__dest" * identifier) != (pointer_expression "*param_4" * identifier)) ))) )) (compound_statement "{\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }" { (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (expression_statement "__src = param_4;" (assignment_expression "__src = param_4" identifier = identifier) ;) (expression_statement "iVar3 = param_5;" (assignment_expression "iVar3 = param_5" identifier = identifier) ;) }) (else_clause "else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" else (compound_statement "{\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" { (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) (do_statement "do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);" do (compound_statement "{\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    }" { (expression_statement "uVar9 = uVar5;" (assignment_expression "uVar9 = uVar5" identifier = identifier) ;) (if_statement "if ((ulong)(iVar6 - 1) + 1 == uVar9) break;" if (parenthesized_expression "((ulong)(iVar6 - 1) + 1 == uVar9)" ( (binary_expression "(ulong)(iVar6 - 1) + 1 == uVar9" (binary_expression "(ulong)(iVar6 - 1) + 1" (call_expression "(ulong)(iVar6 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar6 - 1)" ( (binary_expression "iVar6 - 1" identifier - number_literal) ))) + number_literal) == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = uVar9 + 1;" (assignment_expression "uVar5 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(__dest[uVar9] == param_4[uVar9])" ( (binary_expression "__dest[uVar9] == param_4[uVar9]" (subscript_expression "__dest[uVar9]" identifier [ identifier ]) == (subscript_expression "param_4[uVar9]" identifier [ identifier ])) )) ;) (expression_statement "__src = param_4 + uVar9;" (assignment_expression "__src = param_4 + uVar9" identifier = (binary_expression "param_4 + uVar9" identifier + identifier)) ;) (expression_statement "iVar3 = param_5 - (int)uVar9;" (assignment_expression "iVar3 = param_5 - (int)uVar9" identifier = (binary_expression "param_5 - (int)uVar9" identifier - (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }))) (expression_statement "memcpy(__dest,param_4,(long)param_5);" (call_expression "memcpy(__dest,param_4,(long)param_5)" identifier (argument_list "(__dest,param_4,(long)param_5)" ( identifier , identifier , (cast_expression "(long)param_5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "*(int *)(param_3 + 1) = param_5;" (assignment_expression "*(int *)(param_3 + 1) = param_5" (pointer_expression "*(int *)(param_3 + 1)" * (cast_expression "(int *)(param_3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar8 = *param_2;\n  }" { (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) }) (else_clause "else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" else (compound_statement "{\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" { (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pbVar4 = (byte *)(iVar8 + lVar1);" (assignment_expression "pbVar4 = (byte *)(iVar8 + lVar1)" identifier = (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) )))) ;) (do_statement "do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);" do (compound_statement "{\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    }" { (expression_statement "pbVar10 = pbVar4;" (assignment_expression "pbVar10 = pbVar4" identifier = identifier) ;) (expression_statement "bVar2 = (byte)uVar9;" (assignment_expression "bVar2 = (byte)uVar9" identifier = (cast_expression "(byte)uVar9" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar9 = uVar9 >> 7;" (assignment_expression "uVar9 = uVar9 >> 7" identifier = (binary_expression "uVar9 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar10 = bVar2 | 0x80;" (assignment_expression "*pbVar10 = bVar2 | 0x80" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar4 = pbVar10 + 1;" (assignment_expression "pbVar4 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar9 != 0)" ( (binary_expression "uVar9 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar10 = bVar2 & 0x7f;" (assignment_expression "*pbVar10 = bVar2 & 0x7f" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));" (assignment_expression "iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" identifier = (binary_expression "*param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" (pointer_expression "*param_2" * identifier) + (parenthesized_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" ( (binary_expression "(int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)" (cast_expression "(int)(pbVar10 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar10 + 1)" ( (binary_expression "pbVar10 + 1" identifier + number_literal) ))) - (cast_expression "(int)(byte *)(iVar8 + lVar1)" ( (type_descriptor "int" primitive_type) ) (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) ))))) )))) ;) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" * identifier) = identifier) ;) }))) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "sVar7 = (long)iVar3;" (assignment_expression "sVar7 = (long)iVar3" identifier = (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "pbVar4 = (byte *)(iVar8 + lVar1);" (assignment_expression "pbVar4 = (byte *)(iVar8 + lVar1)" identifier = (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) )))) ;) (do_statement "do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);" do (compound_statement "{\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  }" { (expression_statement "pbVar10 = pbVar4;" (assignment_expression "pbVar10 = pbVar4" identifier = identifier) ;) (expression_statement "bVar2 = (byte)sVar7;" (assignment_expression "bVar2 = (byte)sVar7" identifier = (cast_expression "(byte)sVar7" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "sVar7 = sVar7 >> 7;" (assignment_expression "sVar7 = sVar7 >> 7" identifier = (binary_expression "sVar7 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar10 = bVar2 | 0x80;" (assignment_expression "*pbVar10 = bVar2 | 0x80" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar4 = pbVar10 + 1;" (assignment_expression "pbVar4 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(sVar7 != 0)" ( (binary_expression "sVar7 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar10 = bVar2 & 0x7f;" (assignment_expression "*pbVar10 = bVar2 & 0x7f" (pointer_expression "*pbVar10" * identifier) = (binary_expression "bVar2 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;" (assignment_expression "iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2" identifier = (binary_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2" (parenthesized_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" ( (binary_expression "(int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)" (cast_expression "(int)(pbVar10 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar10 + 1)" ( (binary_expression "pbVar10 + 1" identifier + number_literal) ))) - (cast_expression "(int)(byte *)(iVar8 + lVar1)" ( (type_descriptor "int" primitive_type) ) (cast_expression "(byte *)(iVar8 + lVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + lVar1)" ( (binary_expression "iVar8 + lVar1" identifier + identifier) ))))) )) + (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);" (call_expression "memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3)" identifier (argument_list "((void *)(*param_1 + (long)iVar8),__src,(long)iVar3)" ( (cast_expression "(void *)(*param_1 + (long)iVar8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + (long)iVar8)" ( (binary_expression "*param_1 + (long)iVar8" (pointer_expression "*param_1" * identifier) + (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*param_2 = iVar3 + iVar8;" (assignment_expression "*param_2 = iVar3 + iVar8" (pointer_expression "*param_2" * identifier) = (binary_expression "iVar3 + iVar8" identifier + identifier)) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (if_statement "if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }" if (parenthesized_expression "(param_6 != (void *)0x0)" ( (binary_expression "param_6 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }" { (expression_statement "pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);" (assignment_expression "pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1)" identifier = (cast_expression "(byte *)((long)(iVar3 + iVar8) + *param_1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)(iVar3 + iVar8) + *param_1)" ( (binary_expression "(long)(iVar3 + iVar8) + *param_1" (cast_expression "(long)(iVar3 + iVar8)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar3 + iVar8)" ( (binary_expression "iVar3 + iVar8" identifier + identifier) ))) + (pointer_expression "*param_1" * identifier)) )))) ;) (expression_statement "sVar7 = (long)param_7;" (assignment_expression "sVar7 = (long)param_7" identifier = (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "pbVar4 = pbVar10;" (assignment_expression "pbVar4 = pbVar10" identifier = identifier) ;) (do_statement "do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);" do (compound_statement "{\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    }" { (expression_statement "pbVar11 = pbVar4;" (assignment_expression "pbVar11 = pbVar4" identifier = identifier) ;) (expression_statement "bVar2 = (byte)sVar7;" (assignment_expression "bVar2 = (byte)sVar7" identifier = (cast_expression "(byte)sVar7" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "sVar7 = sVar7 >> 7;" (assignment_expression "sVar7 = sVar7 >> 7" identifier = (binary_expression "sVar7 >> 7" identifier >> number_literal)) ;) (expression_statement "*pbVar11 = bVar2 | 0x80;" (assignment_expression "*pbVar11 = bVar2 | 0x80" (pointer_expression "*pbVar11" * identifier) = (binary_expression "bVar2 | 0x80" identifier | number_literal)) ;) (expression_statement "pbVar4 = pbVar11 + 1;" (assignment_expression "pbVar4 = pbVar11 + 1" identifier = (binary_expression "pbVar11 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(sVar7 != 0)" ( (binary_expression "sVar7 != 0" identifier != number_literal) )) ;) (expression_statement "*pbVar11 = bVar2 & 0x7f;" (assignment_expression "*pbVar11 = bVar2 & 0x7f" (pointer_expression "*pbVar11" * identifier) = (binary_expression "bVar2 & 0x7f" identifier & number_literal)) ;) (expression_statement "iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;" (assignment_expression "iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2" identifier = (binary_expression "((int)(pbVar11 + 1) - (int)pbVar10) + *param_2" (parenthesized_expression "((int)(pbVar11 + 1) - (int)pbVar10)" ( (binary_expression "(int)(pbVar11 + 1) - (int)pbVar10" (cast_expression "(int)(pbVar11 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar11 + 1)" ( (binary_expression "pbVar11 + 1" identifier + number_literal) ))) - (cast_expression "(int)pbVar10" ( (type_descriptor "int" primitive_type) ) identifier)) )) + (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);" (call_expression "memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7)" identifier (argument_list "((void *)(*param_1 + (long)iVar8),param_6,(long)param_7)" ( (cast_expression "(void *)(*param_1 + (long)iVar8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + (long)iVar8)" ( (binary_expression "*param_1 + (long)iVar8" (pointer_expression "*param_1" * identifier) + (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) , identifier , (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "*param_2 = *param_2 + param_7;" (assignment_expression "*param_2 = *param_2 + param_7" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 + param_7" (pointer_expression "*param_2" * identifier) + identifier)) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar6;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) , IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (pointer_expression * IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) + LIT) == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) == (subscript_expression IDENT [ IDENT ])) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) - (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) - (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) )) + (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ))) , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) + (pointer_expression * IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) + (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ))) , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)\n\n{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar6;\n}" (primitive_type "int") (function_declarator "FUN_00136b60(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)" (identifier "FUN_00136b60") (parameter_list "(long *param_1,int *param_2,undefined8 *param_3,char *param_4,int param_5,\n                void *param_6,int param_7)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined8 *param_3" (type_identifier "undefined8") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "char *param_4" (primitive_type "char") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) (, ",") (parameter_declaration "void *param_6" (primitive_type "void") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) (, ",") (parameter_declaration "int param_7" (primitive_type "int") (identifier "param_7")) () ")"))) (compound_statement "{\n  char *__dest;\n  long lVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  ulong uVar5;\n  int iVar6;\n  size_t sVar7;\n  int iVar8;\n  ulong uVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  char *__src;\n  long in_FS_OFFSET;\n  int local_44;\n  long local_40;\n  \n  iVar8 = *(int *)(param_3 + 1);\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_44 = 0;\n  iVar6 = iVar8;\n  if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }\n  __dest = (char *)*param_3;\n  if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }\n  memcpy(__dest,param_4,(long)param_5);\n  *(int *)(param_3 + 1) = param_5;\n  if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }\n  lVar1 = *param_1;\n  sVar7 = (long)iVar3;\n  pbVar4 = (byte *)(iVar8 + lVar1);\n  do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);\n  *pbVar10 = bVar2 & 0x7f;\n  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;\n  *param_2 = iVar8;\n  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);\n  iVar8 = *param_2;\n  *param_2 = iVar3 + iVar8;\n  iVar6 = 0;\n  if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }\nLAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar6;\n}" ({ "{") (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "size_t sVar7;" (primitive_type "size_t") (identifier "sVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "ulong uVar9;" (type_identifier "ulong") (identifier "uVar9") (; ";")) (declaration "byte *pbVar10;" (type_identifier "byte") (pointer_declarator "*pbVar10" (* "*") (identifier "pbVar10")) (; ";")) (declaration "byte *pbVar11;" (type_identifier "byte") (pointer_declarator "*pbVar11" (* "*") (identifier "pbVar11")) (; ";")) (declaration "char *__src;" (primitive_type "char") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "int local_44;" (primitive_type "int") (identifier "local_44") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "iVar8 = *(int *)(param_3 + 1);" (assignment_expression "iVar8 = *(int *)(param_3 + 1)" (identifier "iVar8") (= "=") (pointer_expression "*(int *)(param_3 + 1)" (* "*") (cast_expression "(int *)(param_3 + 1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "local_44 = 0;" (assignment_expression "local_44 = 0" (identifier "local_44") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = iVar8;" (assignment_expression "iVar6 = iVar8" (identifier "iVar6") (= "=") (identifier "iVar8")) (; ";")) (if_statement "if (*(int *)((long)param_3 + 0xc) < param_5) {\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }" (if "if") (parenthesized_expression "(*(int *)((long)param_3 + 0xc) < param_5)" (( "(") (binary_expression "*(int *)((long)param_3 + 0xc) < param_5" (pointer_expression "*(int *)((long)param_3 + 0xc)" (* "*") (cast_expression "(int *)((long)param_3 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_3 + 0xc)" (( "(") (binary_expression "(long)param_3 + 0xc" (cast_expression "(long)param_3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_3")) (+ "+") (number_literal "0xc")) () ")")))) (< "<") (identifier "param_5")) () ")")) (compound_statement "{\n    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);\n    iVar6 = local_44;\n    if (local_44 != 0) goto LAB_00136cee;\n    iVar6 = *(int *)(param_3 + 1);\n  }" ({ "{") (expression_statement "FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);" (call_expression "FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44)" (identifier "FUN_00136850") (argument_list "(param_3,(long)param_3 + 0xc,param_5,&local_44)" (( "(") (identifier "param_3") (, ",") (binary_expression "(long)param_3 + 0xc" (cast_expression "(long)param_3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_3")) (+ "+") (number_literal "0xc")) (, ",") (identifier "param_5") (, ",") (pointer_expression "&local_44" (& "&") (identifier "local_44")) () ")"))) (; ";")) (expression_statement "iVar6 = local_44;" (assignment_expression "iVar6 = local_44" (identifier "iVar6") (= "=") (identifier "local_44")) (; ";")) (if_statement "if (local_44 != 0) goto LAB_00136cee;" (if "if") (parenthesized_expression "(local_44 != 0)" (( "(") (binary_expression "local_44 != 0" (identifier "local_44") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00136cee;" (goto "goto") (statement_identifier "LAB_00136cee") (; ";"))) (expression_statement "iVar6 = *(int *)(param_3 + 1);" (assignment_expression "iVar6 = *(int *)(param_3 + 1)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(param_3 + 1)" (* "*") (cast_expression "(int *)(param_3 + 1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (} "}"))) (expression_statement "__dest = (char *)*param_3;" (assignment_expression "__dest = (char *)*param_3" (identifier "__dest") (= "=") (cast_expression "(char *)*param_3" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_3" (* "*") (identifier "param_3")))) (; ";")) (if_statement "if ((iVar6 < 1) || (*__dest != *param_4)) {\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }\n  else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" (if "if") (parenthesized_expression "((iVar6 < 1) || (*__dest != *param_4))" (( "(") (binary_expression "(iVar6 < 1) || (*__dest != *param_4)" (parenthesized_expression "(iVar6 < 1)" (( "(") (binary_expression "iVar6 < 1" (identifier "iVar6") (< "<") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "(*__dest != *param_4)" (( "(") (binary_expression "*__dest != *param_4" (pointer_expression "*__dest" (* "*") (identifier "__dest")) (!= "!=") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) () ")"))) () ")")) (compound_statement "{\n    uVar9 = 0;\n    __src = param_4;\n    iVar3 = param_5;\n  }" ({ "{") (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" (identifier "uVar9") (= "=") (number_literal "0")) (; ";")) (expression_statement "__src = param_4;" (assignment_expression "__src = param_4" (identifier "__src") (= "=") (identifier "param_4")) (; ";")) (expression_statement "iVar3 = param_5;" (assignment_expression "iVar3 = param_5" (identifier "iVar3") (= "=") (identifier "param_5")) (; ";")) (} "}")) (else_clause "else {\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" (else "else") (compound_statement "{\n    uVar5 = 1;\n    do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);\n    __src = param_4 + uVar9;\n    iVar3 = param_5 - (int)uVar9;\n  }" ({ "{") (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" (identifier "uVar5") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    } while (__dest[uVar9] == param_4[uVar9]);" (do "do") (compound_statement "{\n      uVar9 = uVar5;\n      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;\n      uVar5 = uVar9 + 1;\n    }" ({ "{") (expression_statement "uVar9 = uVar5;" (assignment_expression "uVar9 = uVar5" (identifier "uVar9") (= "=") (identifier "uVar5")) (; ";")) (if_statement "if ((ulong)(iVar6 - 1) + 1 == uVar9) break;" (if "if") (parenthesized_expression "((ulong)(iVar6 - 1) + 1 == uVar9)" (( "(") (binary_expression "(ulong)(iVar6 - 1) + 1 == uVar9" (binary_expression "(ulong)(iVar6 - 1) + 1" (call_expression "(ulong)(iVar6 - 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(iVar6 - 1)" (( "(") (binary_expression "iVar6 - 1" (identifier "iVar6") (- "-") (number_literal "1")) () ")"))) (+ "+") (number_literal "1")) (== "==") (identifier "uVar9")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar5 = uVar9 + 1;" (assignment_expression "uVar5 = uVar9 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar9 + 1" (identifier "uVar9") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(__dest[uVar9] == param_4[uVar9])" (( "(") (binary_expression "__dest[uVar9] == param_4[uVar9]" (subscript_expression "__dest[uVar9]" (identifier "__dest") ([ "[") (identifier "uVar9") (] "]")) (== "==") (subscript_expression "param_4[uVar9]" (identifier "param_4") ([ "[") (identifier "uVar9") (] "]"))) () ")")) (; ";")) (expression_statement "__src = param_4 + uVar9;" (assignment_expression "__src = param_4 + uVar9" (identifier "__src") (= "=") (binary_expression "param_4 + uVar9" (identifier "param_4") (+ "+") (identifier "uVar9"))) (; ";")) (expression_statement "iVar3 = param_5 - (int)uVar9;" (assignment_expression "iVar3 = param_5 - (int)uVar9" (identifier "iVar3") (= "=") (binary_expression "param_5 - (int)uVar9" (identifier "param_5") (- "-") (cast_expression "(int)uVar9" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar9")))) (; ";")) (} "}")))) (expression_statement "memcpy(__dest,param_4,(long)param_5);" (call_expression "memcpy(__dest,param_4,(long)param_5)" (identifier "memcpy") (argument_list "(__dest,param_4,(long)param_5)" (( "(") (identifier "__dest") (, ",") (identifier "param_4") (, ",") (cast_expression "(long)param_5" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_5")) () ")"))) (; ";")) (expression_statement "*(int *)(param_3 + 1) = param_5;" (assignment_expression "*(int *)(param_3 + 1) = param_5" (pointer_expression "*(int *)(param_3 + 1)" (* "*") (cast_expression "(int *)(param_3 + 1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")")))) (= "=") (identifier "param_5")) (; ";")) (if_statement "if (iVar8 == 0) {\n    iVar8 = *param_2;\n  }\n  else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" (if "if") (parenthesized_expression "(iVar8 == 0)" (( "(") (binary_expression "iVar8 == 0" (identifier "iVar8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar8 = *param_2;\n  }" ({ "{") (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" (identifier "iVar8") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}")) (else_clause "else {\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" (else "else") (compound_statement "{\n    iVar8 = *param_2;\n    lVar1 = *param_1;\n    pbVar4 = (byte *)(iVar8 + lVar1);\n    do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);\n    *pbVar10 = bVar2 & 0x7f;\n    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));\n    *param_2 = iVar8;\n  }" ({ "{") (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" (identifier "iVar8") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "pbVar4 = (byte *)(iVar8 + lVar1);" (assignment_expression "pbVar4 = (byte *)(iVar8 + lVar1)" (identifier "pbVar4") (= "=") (cast_expression "(byte *)(iVar8 + lVar1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + lVar1)" (( "(") (binary_expression "iVar8 + lVar1" (identifier "iVar8") (+ "+") (identifier "lVar1")) () ")")))) (; ";")) (do_statement "do {\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    } while (uVar9 != 0);" (do "do") (compound_statement "{\n      pbVar10 = pbVar4;\n      bVar2 = (byte)uVar9;\n      uVar9 = uVar9 >> 7;\n      *pbVar10 = bVar2 | 0x80;\n      pbVar4 = pbVar10 + 1;\n    }" ({ "{") (expression_statement "pbVar10 = pbVar4;" (assignment_expression "pbVar10 = pbVar4" (identifier "pbVar10") (= "=") (identifier "pbVar4")) (; ";")) (expression_statement "bVar2 = (byte)uVar9;" (assignment_expression "bVar2 = (byte)uVar9" (identifier "bVar2") (= "=") (cast_expression "(byte)uVar9" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar9"))) (; ";")) (expression_statement "uVar9 = uVar9 >> 7;" (assignment_expression "uVar9 = uVar9 >> 7" (identifier "uVar9") (= "=") (binary_expression "uVar9 >> 7" (identifier "uVar9") (>> ">>") (number_literal "7"))) (; ";")) (expression_statement "*pbVar10 = bVar2 | 0x80;" (assignment_expression "*pbVar10 = bVar2 | 0x80" (pointer_expression "*pbVar10" (* "*") (identifier "pbVar10")) (= "=") (binary_expression "bVar2 | 0x80" (identifier "bVar2") (| "|") (number_literal "0x80"))) (; ";")) (expression_statement "pbVar4 = pbVar10 + 1;" (assignment_expression "pbVar4 = pbVar10 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar10 + 1" (identifier "pbVar10") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar9 != 0)" (( "(") (binary_expression "uVar9 != 0" (identifier "uVar9") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "*pbVar10 = bVar2 & 0x7f;" (assignment_expression "*pbVar10 = bVar2 & 0x7f" (pointer_expression "*pbVar10" (* "*") (identifier "pbVar10")) (= "=") (binary_expression "bVar2 & 0x7f" (identifier "bVar2") (& "&") (number_literal "0x7f"))) (; ";")) (expression_statement "iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));" (assignment_expression "iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" (identifier "iVar8") (= "=") (binary_expression "*param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (parenthesized_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" (( "(") (binary_expression "(int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)" (cast_expression "(int)(pbVar10 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(pbVar10 + 1)" (( "(") (binary_expression "pbVar10 + 1" (identifier "pbVar10") (+ "+") (number_literal "1")) () ")"))) (- "-") (cast_expression "(int)(byte *)(iVar8 + lVar1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(byte *)(iVar8 + lVar1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + lVar1)" (( "(") (binary_expression "iVar8 + lVar1" (identifier "iVar8") (+ "+") (identifier "lVar1")) () ")"))))) () ")")))) (; ";")) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar8")) (; ";")) (} "}")))) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "sVar7 = (long)iVar3;" (assignment_expression "sVar7 = (long)iVar3" (identifier "sVar7") (= "=") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3"))) (; ";")) (expression_statement "pbVar4 = (byte *)(iVar8 + lVar1);" (assignment_expression "pbVar4 = (byte *)(iVar8 + lVar1)" (identifier "pbVar4") (= "=") (cast_expression "(byte *)(iVar8 + lVar1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + lVar1)" (( "(") (binary_expression "iVar8 + lVar1" (identifier "iVar8") (+ "+") (identifier "lVar1")) () ")")))) (; ";")) (do_statement "do {\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  } while (sVar7 != 0);" (do "do") (compound_statement "{\n    pbVar10 = pbVar4;\n    bVar2 = (byte)sVar7;\n    sVar7 = sVar7 >> 7;\n    *pbVar10 = bVar2 | 0x80;\n    pbVar4 = pbVar10 + 1;\n  }" ({ "{") (expression_statement "pbVar10 = pbVar4;" (assignment_expression "pbVar10 = pbVar4" (identifier "pbVar10") (= "=") (identifier "pbVar4")) (; ";")) (expression_statement "bVar2 = (byte)sVar7;" (assignment_expression "bVar2 = (byte)sVar7" (identifier "bVar2") (= "=") (cast_expression "(byte)sVar7" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "sVar7"))) (; ";")) (expression_statement "sVar7 = sVar7 >> 7;" (assignment_expression "sVar7 = sVar7 >> 7" (identifier "sVar7") (= "=") (binary_expression "sVar7 >> 7" (identifier "sVar7") (>> ">>") (number_literal "7"))) (; ";")) (expression_statement "*pbVar10 = bVar2 | 0x80;" (assignment_expression "*pbVar10 = bVar2 | 0x80" (pointer_expression "*pbVar10" (* "*") (identifier "pbVar10")) (= "=") (binary_expression "bVar2 | 0x80" (identifier "bVar2") (| "|") (number_literal "0x80"))) (; ";")) (expression_statement "pbVar4 = pbVar10 + 1;" (assignment_expression "pbVar4 = pbVar10 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar10 + 1" (identifier "pbVar10") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(sVar7 != 0)" (( "(") (binary_expression "sVar7 != 0" (identifier "sVar7") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "*pbVar10 = bVar2 & 0x7f;" (assignment_expression "*pbVar10 = bVar2 & 0x7f" (pointer_expression "*pbVar10" (* "*") (identifier "pbVar10")) (= "=") (binary_expression "bVar2 & 0x7f" (identifier "bVar2") (& "&") (number_literal "0x7f"))) (; ";")) (expression_statement "iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;" (assignment_expression "iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2" (identifier "iVar8") (= "=") (binary_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2" (parenthesized_expression "((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1))" (( "(") (binary_expression "(int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)" (cast_expression "(int)(pbVar10 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(pbVar10 + 1)" (( "(") (binary_expression "pbVar10 + 1" (identifier "pbVar10") (+ "+") (number_literal "1")) () ")"))) (- "-") (cast_expression "(int)(byte *)(iVar8 + lVar1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(byte *)(iVar8 + lVar1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + lVar1)" (( "(") (binary_expression "iVar8 + lVar1" (identifier "iVar8") (+ "+") (identifier "lVar1")) () ")"))))) () ")")) (+ "+") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar8")) (; ";")) (expression_statement "memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);" (call_expression "memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3)" (identifier "memcpy") (argument_list "((void *)(*param_1 + (long)iVar8),__src,(long)iVar3)" (( "(") (cast_expression "(void *)(*param_1 + (long)iVar8)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + (long)iVar8)" (( "(") (binary_expression "*param_1 + (long)iVar8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (cast_expression "(long)iVar8" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar8"))) () ")"))) (, ",") (identifier "__src") (, ",") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3")) () ")"))) (; ";")) (expression_statement "iVar8 = *param_2;" (assignment_expression "iVar8 = *param_2" (identifier "iVar8") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "*param_2 = iVar3 + iVar8;" (assignment_expression "*param_2 = iVar3 + iVar8" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "iVar3 + iVar8" (identifier "iVar3") (+ "+") (identifier "iVar8"))) (; ";")) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_6 != (void *)0x0) {\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }" (if "if") (parenthesized_expression "(param_6 != (void *)0x0)" (( "(") (binary_expression "param_6 != (void *)0x0" (identifier "param_6") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);\n    sVar7 = (long)param_7;\n    pbVar4 = pbVar10;\n    do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);\n    *pbVar11 = bVar2 & 0x7f;\n    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;\n    *param_2 = iVar8;\n    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);\n    *param_2 = *param_2 + param_7;\n    iVar6 = 0;\n  }" ({ "{") (expression_statement "pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);" (assignment_expression "pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1)" (identifier "pbVar10") (= "=") (cast_expression "(byte *)((long)(iVar3 + iVar8) + *param_1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)(iVar3 + iVar8) + *param_1)" (( "(") (binary_expression "(long)(iVar3 + iVar8) + *param_1" (cast_expression "(long)(iVar3 + iVar8)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(iVar3 + iVar8)" (( "(") (binary_expression "iVar3 + iVar8" (identifier "iVar3") (+ "+") (identifier "iVar8")) () ")"))) (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")")))) (; ";")) (expression_statement "sVar7 = (long)param_7;" (assignment_expression "sVar7 = (long)param_7" (identifier "sVar7") (= "=") (cast_expression "(long)param_7" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_7"))) (; ";")) (expression_statement "pbVar4 = pbVar10;" (assignment_expression "pbVar4 = pbVar10" (identifier "pbVar4") (= "=") (identifier "pbVar10")) (; ";")) (do_statement "do {\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    } while (sVar7 != 0);" (do "do") (compound_statement "{\n      pbVar11 = pbVar4;\n      bVar2 = (byte)sVar7;\n      sVar7 = sVar7 >> 7;\n      *pbVar11 = bVar2 | 0x80;\n      pbVar4 = pbVar11 + 1;\n    }" ({ "{") (expression_statement "pbVar11 = pbVar4;" (assignment_expression "pbVar11 = pbVar4" (identifier "pbVar11") (= "=") (identifier "pbVar4")) (; ";")) (expression_statement "bVar2 = (byte)sVar7;" (assignment_expression "bVar2 = (byte)sVar7" (identifier "bVar2") (= "=") (cast_expression "(byte)sVar7" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "sVar7"))) (; ";")) (expression_statement "sVar7 = sVar7 >> 7;" (assignment_expression "sVar7 = sVar7 >> 7" (identifier "sVar7") (= "=") (binary_expression "sVar7 >> 7" (identifier "sVar7") (>> ">>") (number_literal "7"))) (; ";")) (expression_statement "*pbVar11 = bVar2 | 0x80;" (assignment_expression "*pbVar11 = bVar2 | 0x80" (pointer_expression "*pbVar11" (* "*") (identifier "pbVar11")) (= "=") (binary_expression "bVar2 | 0x80" (identifier "bVar2") (| "|") (number_literal "0x80"))) (; ";")) (expression_statement "pbVar4 = pbVar11 + 1;" (assignment_expression "pbVar4 = pbVar11 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar11 + 1" (identifier "pbVar11") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(sVar7 != 0)" (( "(") (binary_expression "sVar7 != 0" (identifier "sVar7") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "*pbVar11 = bVar2 & 0x7f;" (assignment_expression "*pbVar11 = bVar2 & 0x7f" (pointer_expression "*pbVar11" (* "*") (identifier "pbVar11")) (= "=") (binary_expression "bVar2 & 0x7f" (identifier "bVar2") (& "&") (number_literal "0x7f"))) (; ";")) (expression_statement "iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;" (assignment_expression "iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2" (identifier "iVar8") (= "=") (binary_expression "((int)(pbVar11 + 1) - (int)pbVar10) + *param_2" (parenthesized_expression "((int)(pbVar11 + 1) - (int)pbVar10)" (( "(") (binary_expression "(int)(pbVar11 + 1) - (int)pbVar10" (cast_expression "(int)(pbVar11 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(pbVar11 + 1)" (( "(") (binary_expression "pbVar11 + 1" (identifier "pbVar11") (+ "+") (number_literal "1")) () ")"))) (- "-") (cast_expression "(int)pbVar10" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar10"))) () ")")) (+ "+") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "*param_2 = iVar8;" (assignment_expression "*param_2 = iVar8" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar8")) (; ";")) (expression_statement "memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);" (call_expression "memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7)" (identifier "memcpy") (argument_list "((void *)(*param_1 + (long)iVar8),param_6,(long)param_7)" (( "(") (cast_expression "(void *)(*param_1 + (long)iVar8)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + (long)iVar8)" (( "(") (binary_expression "*param_1 + (long)iVar8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (cast_expression "(long)iVar8" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar8"))) () ")"))) (, ",") (identifier "param_6") (, ",") (cast_expression "(long)param_7" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_7")) () ")"))) (; ";")) (expression_statement "*param_2 = *param_2 + param_7;" (assignment_expression "*param_2 = *param_2 + param_7" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "*param_2 + param_7" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (identifier "param_7"))) (; ";")) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (} "}"))) (labeled_statement "LAB_00136cee:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (statement_identifier "LAB_00136cee") (: ":") (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (!= "!=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return iVar6;" (return "return") (identifier "iVar6") (; ";")) (} "}")))

/* DWARF original prototype: int fts3AppendToNode(Blob * pNode, Blob * pPrev, char * zTerm, int
   nTerm, char * aDoclist, int nDoclist, Blob * pNode) */

int function_1(type_1 *pNode,type_1 *pPrev,char *var_2,int nTerm,char *aDoclist,int nDoclist,
                    type_1 *pNode_1)

{
  char *__dest;
  type_2 var_12;
  type_2 *pbVar2;
  type_3 uVar3;
  int var_7;
  size_t var_14;
  int var_11;
  type_4 in_register_0000000c;
  char *var_9;
  type_2 *var_13;
  type_3 var_8;
  int var_15;
  int var_4;
  type_4 in_register_0000008c;
  char *__src;
  long var_3;
  int var_6;
  long var_16;
  
  var_4 = (int)aDoclist;
  var_9 = (char *)var_1(in_register_0000000c,nTerm);
  var_11 = *(int *)(var_2 + 8);
  var_16 = *(long *)(var_3 + 0x28);
  var_6 = 0;
  var_7 = var_11;
  if (*(int *)(var_2 + 0xc) < var_4) {
    var_5((type_1 *)var_2,(int)var_2 + 0xc,(int *)((type_3)aDoclist & 0xffffffff),(type_1 *)&var_6)
    ;
    var_7 = var_6;
    if (var_6 != 0) goto LAB_00136cee;
    var_7 = *(int *)(var_2 + 8);
  }
  __dest = *(char **)var_2;
  if ((var_7 < 1) || (*__dest != *var_9)) {
    var_8 = 0;
    __src = var_9;
    var_15 = var_4;
  }
  else {
    uVar3 = 1;
    do {
      var_8 = uVar3;
      if ((type_3)(var_7 - 1) + 1 == var_8) break;
      uVar3 = var_8 + 1;
    } while (__dest[var_8] == var_9[var_8]);
    __src = var_9 + var_8;
    var_15 = var_4 - (int)var_8;
  }
  var_10(__dest,var_9,(long)var_4);
  *(int *)(var_2 + 8) = var_4;
  if (var_11 == 0) {
    var_11 = *(int *)&pPrev->a;
  }
  else {
    var_11 = *(int *)&pPrev->a;
    var_9 = pNode->a;
    pbVar2 = (type_2 *)(var_9 + var_11);
    do {
      var_13 = pbVar2;
      var_12 = (type_2)var_8;
      var_8 = var_8 >> 7;
      *var_13 = var_12 | 0x80;
      pbVar2 = var_13 + 1;
    } while (var_8 != 0);
    *var_13 = var_12 & 0x7f;
    var_11 = *(int *)&pPrev->a + ((int)(var_13 + 1) - (int)(var_9 + var_11));
    *(int *)&pPrev->a = var_11;
  }
  var_9 = pNode->a;
  var_14 = (long)var_15;
  pbVar2 = (type_2 *)(var_9 + var_11);
  do {
    var_13 = pbVar2;
    var_12 = (type_2)var_14;
    var_14 = var_14 >> 7;
    *var_13 = var_12 | 0x80;
    pbVar2 = var_13 + 1;
  } while (var_14 != 0);
  *var_13 = var_12 & 0x7f;
  var_11 = ((int)(var_13 + 1) - (int)(var_9 + var_11)) + *(int *)&pPrev->a;
  *(int *)&pPrev->a = var_11;
  var_10(pNode->a + var_11,__src,(long)var_15);
  var_15 = var_15 + *(int *)&pPrev->a;
  *(int *)&pPrev->a = var_15;
  var_7 = 0;
  if ((void *)var_1(in_register_0000008c,nDoclist) != (void *)0x0) {
    var_9 = pNode->a;
    var_14 = (long)(int)pNode_1;
    pbVar2 = (type_2 *)(var_9 + var_15);
    do {
      var_13 = pbVar2;
      var_12 = (type_2)var_14;
      var_14 = var_14 >> 7;
      *var_13 = var_12 | 0x80;
      pbVar2 = var_13 + 1;
    } while (var_14 != 0);
    *var_13 = var_12 & 0x7f;
    var_11 = ((int)(var_13 + 1) - (int)(var_9 + var_15)) + *(int *)&pPrev->a;
    *(int *)&pPrev->a = var_11;
    var_10(pNode->a + var_11,(void *)var_1(in_register_0000008c,nDoclist),(long)(int)pNode_1);
    *(int *)&pPrev->a = *(int *)&pPrev->a + (int)pNode_1;
    var_7 = 0;
  }
LAB_00136cee:
  if (var_16 != *(long *)(var_3 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_17();
  }
  return var_7;
}


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

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

{
  char *__dest;
  long lVar1;
  byte bVar2;
  int iVar3;
  byte *pbVar4;
  ulong uVar5;
  int iVar6;
  size_t sVar7;
  int iVar8;
  ulong uVar9;
  byte *pbVar10;
  byte *pbVar11;
  char *__src;
  long in_FS_OFFSET;
  int local_44;
  long local_40;
  
  iVar8 = *(int *)(param_3 + 1);
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_44 = 0;
  iVar6 = iVar8;
  if (*(int *)((long)param_3 + 0xc) < param_5) {
    FUN_00136850(param_3,(long)param_3 + 0xc,param_5,&local_44);
    iVar6 = local_44;
    if (local_44 != 0) goto LAB_00136cee;
    iVar6 = *(int *)(param_3 + 1);
  }
  __dest = (char *)*param_3;
  if ((iVar6 < 1) || (*__dest != *param_4)) {
    uVar9 = 0;
    __src = param_4;
    iVar3 = param_5;
  }
  else {
    uVar5 = 1;
    do {
      uVar9 = uVar5;
      if ((ulong)(iVar6 - 1) + 1 == uVar9) break;
      uVar5 = uVar9 + 1;
    } while (__dest[uVar9] == param_4[uVar9]);
    __src = param_4 + uVar9;
    iVar3 = param_5 - (int)uVar9;
  }
  memcpy(__dest,param_4,(long)param_5);
  *(int *)(param_3 + 1) = param_5;
  if (iVar8 == 0) {
    iVar8 = *param_2;
  }
  else {
    iVar8 = *param_2;
    lVar1 = *param_1;
    pbVar4 = (byte *)(iVar8 + lVar1);
    do {
      pbVar10 = pbVar4;
      bVar2 = (byte)uVar9;
      uVar9 = uVar9 >> 7;
      *pbVar10 = bVar2 | 0x80;
      pbVar4 = pbVar10 + 1;
    } while (uVar9 != 0);
    *pbVar10 = bVar2 & 0x7f;
    iVar8 = *param_2 + ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1));
    *param_2 = iVar8;
  }
  lVar1 = *param_1;
  sVar7 = (long)iVar3;
  pbVar4 = (byte *)(iVar8 + lVar1);
  do {
    pbVar10 = pbVar4;
    bVar2 = (byte)sVar7;
    sVar7 = sVar7 >> 7;
    *pbVar10 = bVar2 | 0x80;
    pbVar4 = pbVar10 + 1;
  } while (sVar7 != 0);
  *pbVar10 = bVar2 & 0x7f;
  iVar8 = ((int)(pbVar10 + 1) - (int)(byte *)(iVar8 + lVar1)) + *param_2;
  *param_2 = iVar8;
  memcpy((void *)(*param_1 + (long)iVar8),__src,(long)iVar3);
  iVar8 = *param_2;
  *param_2 = iVar3 + iVar8;
  iVar6 = 0;
  if (param_6 != (void *)0x0) {
    pbVar10 = (byte *)((long)(iVar3 + iVar8) + *param_1);
    sVar7 = (long)param_7;
    pbVar4 = pbVar10;
    do {
      pbVar11 = pbVar4;
      bVar2 = (byte)sVar7;
      sVar7 = sVar7 >> 7;
      *pbVar11 = bVar2 | 0x80;
      pbVar4 = pbVar11 + 1;
    } while (sVar7 != 0);
    *pbVar11 = bVar2 & 0x7f;
    iVar8 = ((int)(pbVar11 + 1) - (int)pbVar10) + *param_2;
    *param_2 = iVar8;
    memcpy((void *)(*param_1 + (long)iVar8),param_6,(long)param_7);
    *param_2 = *param_2 + param_7;
    iVar6 = 0;
  }
LAB_00136cee:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar6;
}

