
int sqlite3Fts3SegReaderNew
              (int iAge,int bLookup,sqlite3_int64 iStartLeaf,sqlite3_int64 iEndLeaf,
              sqlite3_int64 iEndBlock,char *zRoot,int nRoot,Fts3SegReader **ppReader)

{
  Fts3SegReader *__dest;
  Fts3SegReader *pFVar1;
  ulong uVar2;
  undefined8 *puVar3;
  int iVar4;
  byte bVar5;
  
  bVar5 = 0;
  if (iStartLeaf == 0) {
    if (iEndLeaf != 0) {
      return 0x10b;
    }
    iVar4 = nRoot + 0x14;
  }
  else {
    iVar4 = 0;
  }
  pFVar1 = (Fts3SegReader *)sqlite3_malloc(iVar4 + 0x88);
  if (pFVar1 == (Fts3SegReader *)0x0) {
    iVar4 = 7;
  }
  else {
    *(undefined8 *)&pFVar1->bLookup = 0;
    pFVar1->iDocid = 0;
    puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);
    uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);
    for (; uVar2 != 0; uVar2 = uVar2 - 1) {
      *puVar3 = 0;
      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;
    }
    pFVar1->iIdx = iAge;
    pFVar1->bLookup = bLookup != 0;
    pFVar1->iStartBlock = iStartLeaf;
    pFVar1->iLeafEndBlock = iEndLeaf;
    pFVar1->iEndBlock = iEndBlock;
    if (iVar4 == 0) {
      pFVar1->iCurrentBlock = iStartLeaf + -1;
    }
    else {
      __dest = pFVar1 + 1;
      pFVar1->aNode = (char *)__dest;
      pFVar1->rootOnly = '\x01';
      pFVar1->nNode = nRoot;
      if (nRoot != 0) {
        memcpy(__dest,zRoot,(long)nRoot);
      }
      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);
      *puVar3 = 0;
      puVar3[1] = 0;
      *(undefined4 *)(puVar3 + 2) = 0;
    }
    *ppReader = pFVar1;
    iVar4 = 0;
  }
  return iVar4;
}



undefined8
FUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,
            void *param_6,int param_7,long *param_8)

{
  undefined4 *__dest;
  undefined4 *puVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  ulong uVar4;
  int iVar5;
  byte bVar6;
  
  bVar6 = 0;
  if (param_3 == 0) {
    if (param_4 != 0) {
      return 0x10b;
    }
    iVar5 = param_7 + 0x14;
  }
  else {
    iVar5 = 0;
  }
  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);
  if (puVar1 == (undefined4 *)0x0) {
    uVar3 = 7;
  }
  else {
    *(undefined8 *)(puVar1 + 1) = 0;
    *(undefined8 *)(puVar1 + 0x20) = 0;
    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);
    for (uVar4 = (ulong)(((int)puVar1 -
                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3
                        ); uVar4 != 0; uVar4 = uVar4 - 1) {
      *puVar2 = 0;
      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;
    }
    *puVar1 = param_1;
    *(bool *)(puVar1 + 1) = param_2 != 0;
    *(long *)(puVar1 + 2) = param_3;
    *(long *)(puVar1 + 4) = param_4;
    *(undefined8 *)(puVar1 + 6) = param_5;
    if (iVar5 == 0) {
      *(long *)(puVar1 + 8) = param_3 + -1;
    }
    else {
      __dest = puVar1 + 0x22;
      *(undefined4 **)(puVar1 + 10) = __dest;
      *(undefined1 *)((long)puVar1 + 5) = 1;
      puVar1[0xc] = param_7;
      if (param_7 != 0) {
        memcpy(__dest,param_6,(long)param_7);
      }
      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);
      *puVar2 = 0;
      puVar2[1] = 0;
      *(undefined4 *)(puVar2 + 2) = 0;
    }
    *param_8 = (long)puVar1;
    uVar3 = 0;
  }
  return uVar3;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
TEST RDX,RDX
JNZ 0x0014b644
MOV EAX,0x10b
TEST RCX,RCX
JNZ 0x0014b635
MOV EAX,dword ptr [RSP + 0x50]
LEA R15D,[RAX + 0x14]
MOV qword ptr [RSP + 0x8],R9
MOV qword ptr [RSP],R8
MOV R12,RCX
MOV RBP,RDX
MOV R13D,ESI
MOV R14D,EDI
LEA EDI,[R15 + 0x88]
CALL 0x0014ae6c
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0014b66b
MOV qword ptr [RAX + 0x4],0x0
MOV qword ptr [RAX + 0x80],0x0
LEA RDI,[RAX + 0xc]
AND RDI,-0x8
SUB EAX,EDI
LEA ECX,[RAX + 0x88]
SHR ECX,0x3
MOV ECX,ECX
MOV EAX,0x0
STOSQ.REP RDI
MOV dword ptr [RBX],R14D
TEST R13D,R13D
SETNZ byte ptr [RBX + 0x4]
MOV qword ptr [RBX + 0x8],RBP
MOV qword ptr [RBX + 0x10],R12
MOV RAX,qword ptr [RSP]
MOV qword ptr [RBX + 0x18],RAX
TEST R15D,R15D
JZ 0x0014b661
LEA RBP,[RBX + 0x88]
MOV qword ptr [RBX + 0x28],RBP
MOV byte ptr [RBX + 0x5],0x1
MOV EAX,dword ptr [RSP + 0x50]
MOV dword ptr [RBX + 0x30],EAX
TEST EAX,EAX
JNZ 0x0014b64f
MOVSXD RAX,dword ptr [RSP + 0x50]
ADD RAX,RBP
MOV qword ptr [RAX],0x0
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX],RBX
MOV EAX,0x0
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV R15D,0x0
JMP 0x0014b574
MOVSXD RDX,EAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBP
CALL 0x0010e670
JMP 0x0014b60a
SUB RBP,0x1
MOV qword ptr [RBX + 0x20],RBP
JMP 0x0014b628
MOV EAX,0x7
JMP 0x0014b635
(translation_unit "undefined8\nFUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)\n\n{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined8\nFUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)\n\n{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)" identifier (parameter_list "(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "void *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "int param_7" primitive_type identifier) , (parameter_declaration "long *param_8" (sized_type_specifier "long" long) (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}" { (declaration "undefined4 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte bVar6;" type_identifier identifier ;) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) (if_statement "if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }" { (if_statement "if (param_4 != 0) {\n      return 0x10b;\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n      return 0x10b;\n    }" { (return_statement "return 0x10b;" return number_literal ;) })) (expression_statement "iVar5 = param_7 + 0x14;" (assignment_expression "iVar5 = param_7 + 0x14" identifier = (binary_expression "param_7 + 0x14" identifier + number_literal)) ;) }) (else_clause "else {\n    iVar5 = 0;\n  }" else (compound_statement "{\n    iVar5 = 0;\n  }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) }))) (expression_statement "puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);" (assignment_expression "puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88)" identifier = (cast_expression "(undefined4 *)FUN_0014ae6c(iVar5 + 0x88)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0014ae6c(iVar5 + 0x88)" identifier (argument_list "(iVar5 + 0x88)" ( (binary_expression "iVar5 + 0x88" identifier + number_literal) ))))) ;) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar3 = 7;\n  }" { (expression_statement "uVar3 = 7;" (assignment_expression "uVar3 = 7" identifier = number_literal) ;) }) (else_clause "else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" else (compound_statement "{\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" { (expression_statement "*(undefined8 *)(puVar1 + 1) = 0;" (assignment_expression "*(undefined8 *)(puVar1 + 1) = 0" (pointer_expression "*(undefined8 *)(puVar1 + 1)" * (cast_expression "(undefined8 *)(puVar1 + 1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(puVar1 + 0x20) = 0;" (assignment_expression "*(undefined8 *)(puVar1 + 0x20) = 0" (pointer_expression "*(undefined8 *)(puVar1 + 0x20)" * (cast_expression "(undefined8 *)(puVar1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 0x20)" ( (binary_expression "puVar1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);" (assignment_expression "puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" identifier = (cast_expression "(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (binary_expression "(ulong)(puVar1 + 3) & 0xfffffffffffffff8" (call_expression "(ulong)(puVar1 + 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }" for ( (assignment_expression "uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" identifier = (call_expression "(ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" ( (binary_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3" (binary_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U" (parenthesized_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8))" ( (binary_expression "(int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (type_descriptor "int" primitive_type) ) (cast_expression "(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (binary_expression "(ulong)(puVar1 + 3) & 0xfffffffffffffff8" (call_expression "(ulong)(puVar1 + 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))) & number_literal) ))))) )) + number_literal) >> number_literal) )))) ; (binary_expression "uVar4 != 0" identifier != number_literal) ; (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }" { (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (ulong)bVar6 * -2 + 1" identifier = (binary_expression "puVar2 + (ulong)bVar6 * -2 + 1" (binary_expression "puVar2 + (ulong)bVar6 * -2" identifier + (binary_expression "(ulong)bVar6 * -2" (cast_expression "(ulong)bVar6" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "*puVar1 = param_1;" (assignment_expression "*puVar1 = param_1" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*(bool *)(puVar1 + 1) = param_2 != 0;" (assignment_expression "*(bool *)(puVar1 + 1) = param_2 != 0" (pointer_expression "*(bool *)(puVar1 + 1)" * (cast_expression "(bool *)(puVar1 + 1)" ( (type_descriptor "bool *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = (binary_expression "param_2 != 0" identifier != number_literal)) ;) (expression_statement "*(long *)(puVar1 + 2) = param_3;" (assignment_expression "*(long *)(puVar1 + 2) = param_3" (pointer_expression "*(long *)(puVar1 + 2)" * (cast_expression "(long *)(puVar1 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 2)" ( (binary_expression "puVar1 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(puVar1 + 4) = param_4;" (assignment_expression "*(long *)(puVar1 + 4) = param_4" (pointer_expression "*(long *)(puVar1 + 4)" * (cast_expression "(long *)(puVar1 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(puVar1 + 6) = param_5;" (assignment_expression "*(undefined8 *)(puVar1 + 6) = param_5" (pointer_expression "*(undefined8 *)(puVar1 + 6)" * (cast_expression "(undefined8 *)(puVar1 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 6)" ( (binary_expression "puVar1 + 6" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }" { (expression_statement "*(long *)(puVar1 + 8) = param_3 + -1;" (assignment_expression "*(long *)(puVar1 + 8) = param_3 + -1" (pointer_expression "*(long *)(puVar1 + 8)" * (cast_expression "(long *)(puVar1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) = (binary_expression "param_3 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" else (compound_statement "{\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" { (expression_statement "__dest = puVar1 + 0x22;" (assignment_expression "__dest = puVar1 + 0x22" identifier = (binary_expression "puVar1 + 0x22" identifier + number_literal)) ;) (expression_statement "*(undefined4 **)(puVar1 + 10) = __dest;" (assignment_expression "*(undefined4 **)(puVar1 + 10) = __dest" (pointer_expression "*(undefined4 **)(puVar1 + 10)" * (cast_expression "(undefined4 **)(puVar1 + 10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + 10)" ( (binary_expression "puVar1 + 10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)((long)puVar1 + 5) = 1;" (assignment_expression "*(undefined1 *)((long)puVar1 + 5) = 1" (pointer_expression "*(undefined1 *)((long)puVar1 + 5)" * (cast_expression "(undefined1 *)((long)puVar1 + 5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 5)" ( (binary_expression "(long)puVar1 + 5" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar1[0xc] = param_7;" (assignment_expression "puVar1[0xc] = param_7" (subscript_expression "puVar1[0xc]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }" if (parenthesized_expression "(param_7 != 0)" ( (binary_expression "param_7 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest,param_6,(long)param_7);\n      }" { (expression_statement "memcpy(__dest,param_6,(long)param_7);" (call_expression "memcpy(__dest,param_6,(long)param_7)" identifier (argument_list "(__dest,param_6,(long)param_7)" ( identifier , identifier , (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) })) (expression_statement "puVar2 = (undefined8 *)((long)param_7 + (long)__dest);" (assignment_expression "puVar2 = (undefined8 *)((long)param_7 + (long)__dest)" identifier = (cast_expression "(undefined8 *)((long)param_7 + (long)__dest)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_7 + (long)__dest)" ( (binary_expression "(long)param_7 + (long)__dest" (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined4 *)(puVar2 + 2) = 0;" (assignment_expression "*(undefined4 *)(puVar2 + 2) = 0" (pointer_expression "*(undefined4 *)(puVar2 + 2)" * (cast_expression "(undefined4 *)(puVar2 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = number_literal) ;) }))) (expression_statement "*param_8 = (long)puVar1;" (assignment_expression "*param_8 = (long)puVar1" (pointer_expression "*param_8" * identifier) = (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "int sqlite3Fts3SegReaderNew\n              (int iAge,int bLookup,sqlite3_int64 iStartLeaf,sqlite3_int64 iEndLeaf,\n              sqlite3_int64 iEndBlock,char *zRoot,int nRoot,Fts3SegReader **ppReader)\n\n{\n  Fts3SegReader *__dest;\n  Fts3SegReader *pFVar1;\n  ulong uVar2;\n  undefined8 *puVar3;\n  int iVar4;\n  byte bVar5;\n  \n  bVar5 = 0;\n  if (iStartLeaf == 0) {\n    if (iEndLeaf != 0) {\n      return 0x10b;\n    }\n    iVar4 = nRoot + 0x14;\n  }\n  else {\n    iVar4 = 0;\n  }\n  pFVar1 = (Fts3SegReader *)sqlite3_malloc(iVar4 + 0x88);\n  if (pFVar1 == (Fts3SegReader *)0x0) {\n    iVar4 = 7;\n  }\n  else {\n    *(undefined8 *)&pFVar1->bLookup = 0;\n    pFVar1->iDocid = 0;\n    puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);\n    uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }\n    pFVar1->iIdx = iAge;\n    pFVar1->bLookup = bLookup != 0;\n    pFVar1->iStartBlock = iStartLeaf;\n    pFVar1->iLeafEndBlock = iEndLeaf;\n    pFVar1->iEndBlock = iEndBlock;\n    if (iVar4 == 0) {\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }\n    else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }\n    *ppReader = pFVar1;\n    iVar4 = 0;\n  }\n  return iVar4;\n}\n\n" (function_definition "int sqlite3Fts3SegReaderNew\n              (int iAge,int bLookup,sqlite3_int64 iStartLeaf,sqlite3_int64 iEndLeaf,\n              sqlite3_int64 iEndBlock,char *zRoot,int nRoot,Fts3SegReader **ppReader)\n\n{\n  Fts3SegReader *__dest;\n  Fts3SegReader *pFVar1;\n  ulong uVar2;\n  undefined8 *puVar3;\n  int iVar4;\n  byte bVar5;\n  \n  bVar5 = 0;\n  if (iStartLeaf == 0) {\n    if (iEndLeaf != 0) {\n      return 0x10b;\n    }\n    iVar4 = nRoot + 0x14;\n  }\n  else {\n    iVar4 = 0;\n  }\n  pFVar1 = (Fts3SegReader *)sqlite3_malloc(iVar4 + 0x88);\n  if (pFVar1 == (Fts3SegReader *)0x0) {\n    iVar4 = 7;\n  }\n  else {\n    *(undefined8 *)&pFVar1->bLookup = 0;\n    pFVar1->iDocid = 0;\n    puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);\n    uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }\n    pFVar1->iIdx = iAge;\n    pFVar1->bLookup = bLookup != 0;\n    pFVar1->iStartBlock = iStartLeaf;\n    pFVar1->iLeafEndBlock = iEndLeaf;\n    pFVar1->iEndBlock = iEndBlock;\n    if (iVar4 == 0) {\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }\n    else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }\n    *ppReader = pFVar1;\n    iVar4 = 0;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "sqlite3Fts3SegReaderNew\n              (int iAge,int bLookup,sqlite3_int64 iStartLeaf,sqlite3_int64 iEndLeaf,\n              sqlite3_int64 iEndBlock,char *zRoot,int nRoot,Fts3SegReader **ppReader)" identifier (parameter_list "(int iAge,int bLookup,sqlite3_int64 iStartLeaf,sqlite3_int64 iEndLeaf,\n              sqlite3_int64 iEndBlock,char *zRoot,int nRoot,Fts3SegReader **ppReader)" ( (parameter_declaration "int iAge" primitive_type identifier) , (parameter_declaration "int bLookup" primitive_type identifier) , (parameter_declaration "sqlite3_int64 iStartLeaf" type_identifier identifier) , (parameter_declaration "sqlite3_int64 iEndLeaf" type_identifier identifier) , (parameter_declaration "sqlite3_int64 iEndBlock" type_identifier identifier) , (parameter_declaration "char *zRoot" primitive_type (pointer_declarator "*zRoot" * identifier)) , (parameter_declaration "int nRoot" primitive_type identifier) , (parameter_declaration "Fts3SegReader **ppReader" type_identifier (pointer_declarator "**ppReader" * (pointer_declarator "*ppReader" * identifier))) ))) (compound_statement "{\n  Fts3SegReader *__dest;\n  Fts3SegReader *pFVar1;\n  ulong uVar2;\n  undefined8 *puVar3;\n  int iVar4;\n  byte bVar5;\n  \n  bVar5 = 0;\n  if (iStartLeaf == 0) {\n    if (iEndLeaf != 0) {\n      return 0x10b;\n    }\n    iVar4 = nRoot + 0x14;\n  }\n  else {\n    iVar4 = 0;\n  }\n  pFVar1 = (Fts3SegReader *)sqlite3_malloc(iVar4 + 0x88);\n  if (pFVar1 == (Fts3SegReader *)0x0) {\n    iVar4 = 7;\n  }\n  else {\n    *(undefined8 *)&pFVar1->bLookup = 0;\n    pFVar1->iDocid = 0;\n    puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);\n    uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }\n    pFVar1->iIdx = iAge;\n    pFVar1->bLookup = bLookup != 0;\n    pFVar1->iStartBlock = iStartLeaf;\n    pFVar1->iLeafEndBlock = iEndLeaf;\n    pFVar1->iEndBlock = iEndBlock;\n    if (iVar4 == 0) {\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }\n    else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }\n    *ppReader = pFVar1;\n    iVar4 = 0;\n  }\n  return iVar4;\n}" { (declaration "Fts3SegReader *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "Fts3SegReader *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "byte bVar5;" type_identifier identifier ;) (expression_statement "bVar5 = 0;" (assignment_expression "bVar5 = 0" identifier = number_literal) ;) (if_statement "if (iStartLeaf == 0) {\n    if (iEndLeaf != 0) {\n      return 0x10b;\n    }\n    iVar4 = nRoot + 0x14;\n  }\n  else {\n    iVar4 = 0;\n  }" if (parenthesized_expression "(iStartLeaf == 0)" ( (binary_expression "iStartLeaf == 0" identifier == number_literal) )) (compound_statement "{\n    if (iEndLeaf != 0) {\n      return 0x10b;\n    }\n    iVar4 = nRoot + 0x14;\n  }" { (if_statement "if (iEndLeaf != 0) {\n      return 0x10b;\n    }" if (parenthesized_expression "(iEndLeaf != 0)" ( (binary_expression "iEndLeaf != 0" identifier != number_literal) )) (compound_statement "{\n      return 0x10b;\n    }" { (return_statement "return 0x10b;" return number_literal ;) })) (expression_statement "iVar4 = nRoot + 0x14;" (assignment_expression "iVar4 = nRoot + 0x14" identifier = (binary_expression "nRoot + 0x14" identifier + number_literal)) ;) }) (else_clause "else {\n    iVar4 = 0;\n  }" else (compound_statement "{\n    iVar4 = 0;\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }))) (expression_statement "pFVar1 = (Fts3SegReader *)sqlite3_malloc(iVar4 + 0x88);" (assignment_expression "pFVar1 = (Fts3SegReader *)sqlite3_malloc(iVar4 + 0x88)" identifier = (cast_expression "(Fts3SegReader *)sqlite3_malloc(iVar4 + 0x88)" ( (type_descriptor "Fts3SegReader *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_malloc(iVar4 + 0x88)" identifier (argument_list "(iVar4 + 0x88)" ( (binary_expression "iVar4 + 0x88" identifier + number_literal) ))))) ;) (if_statement "if (pFVar1 == (Fts3SegReader *)0x0) {\n    iVar4 = 7;\n  }\n  else {\n    *(undefined8 *)&pFVar1->bLookup = 0;\n    pFVar1->iDocid = 0;\n    puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);\n    uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }\n    pFVar1->iIdx = iAge;\n    pFVar1->bLookup = bLookup != 0;\n    pFVar1->iStartBlock = iStartLeaf;\n    pFVar1->iLeafEndBlock = iEndLeaf;\n    pFVar1->iEndBlock = iEndBlock;\n    if (iVar4 == 0) {\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }\n    else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }\n    *ppReader = pFVar1;\n    iVar4 = 0;\n  }" if (parenthesized_expression "(pFVar1 == (Fts3SegReader *)0x0)" ( (binary_expression "pFVar1 == (Fts3SegReader *)0x0" identifier == (cast_expression "(Fts3SegReader *)0x0" ( (type_descriptor "Fts3SegReader *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = 7;\n  }" { (expression_statement "iVar4 = 7;" (assignment_expression "iVar4 = 7" identifier = number_literal) ;) }) (else_clause "else {\n    *(undefined8 *)&pFVar1->bLookup = 0;\n    pFVar1->iDocid = 0;\n    puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);\n    uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }\n    pFVar1->iIdx = iAge;\n    pFVar1->bLookup = bLookup != 0;\n    pFVar1->iStartBlock = iStartLeaf;\n    pFVar1->iLeafEndBlock = iEndLeaf;\n    pFVar1->iEndBlock = iEndBlock;\n    if (iVar4 == 0) {\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }\n    else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }\n    *ppReader = pFVar1;\n    iVar4 = 0;\n  }" else (compound_statement "{\n    *(undefined8 *)&pFVar1->bLookup = 0;\n    pFVar1->iDocid = 0;\n    puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);\n    uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);\n    for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }\n    pFVar1->iIdx = iAge;\n    pFVar1->bLookup = bLookup != 0;\n    pFVar1->iStartBlock = iStartLeaf;\n    pFVar1->iLeafEndBlock = iEndLeaf;\n    pFVar1->iEndBlock = iEndBlock;\n    if (iVar4 == 0) {\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }\n    else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }\n    *ppReader = pFVar1;\n    iVar4 = 0;\n  }" { (expression_statement "*(undefined8 *)&pFVar1->bLookup = 0;" (assignment_expression "*(undefined8 *)&pFVar1->bLookup = 0" (pointer_expression "*(undefined8 *)&pFVar1->bLookup" * (cast_expression "(undefined8 *)&pFVar1->bLookup" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pFVar1->bLookup" & (field_expression "pFVar1->bLookup" identifier -> field_identifier)))) = number_literal) ;) (expression_statement "pFVar1->iDocid = 0;" (assignment_expression "pFVar1->iDocid = 0" (field_expression "pFVar1->iDocid" identifier -> field_identifier) = number_literal) ;) (expression_statement "puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8);" (assignment_expression "puVar3 = (undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8)" identifier = (cast_expression "(undefined8 *)((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8)" ( (binary_expression "(ulong)((long)&pFVar1->iStartBlock + 4U) & 0xfffffffffffffff8" (call_expression "(ulong)((long)&pFVar1->iStartBlock + 4U)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((long)&pFVar1->iStartBlock + 4U)" ( (binary_expression "(long)&pFVar1->iStartBlock + 4U" (cast_expression "(long)&pFVar1->iStartBlock" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&pFVar1->iStartBlock" & (field_expression "pFVar1->iStartBlock" identifier -> field_identifier))) + number_literal) ))) & number_literal) )))) ;) (expression_statement "uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3);" (assignment_expression "uVar2 = (ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3)" identifier = (call_expression "(ulong)(((int)pFVar1 - (int)puVar3) + 0x88U >> 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(((int)pFVar1 - (int)puVar3) + 0x88U >> 3)" ( (binary_expression "((int)pFVar1 - (int)puVar3) + 0x88U >> 3" (binary_expression "((int)pFVar1 - (int)puVar3) + 0x88U" (parenthesized_expression "((int)pFVar1 - (int)puVar3)" ( (binary_expression "(int)pFVar1 - (int)puVar3" (cast_expression "(int)pFVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) + number_literal) >> number_literal) )))) ;) (for_statement "for (; uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }" for ( ; (binary_expression "uVar2 != 0" identifier != number_literal) ; (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar3 = 0;\n      puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;\n    }" { (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (ulong)bVar5 * -2 + 1" identifier = (binary_expression "puVar3 + (ulong)bVar5 * -2 + 1" (binary_expression "puVar3 + (ulong)bVar5 * -2" identifier + (binary_expression "(ulong)bVar5 * -2" (cast_expression "(ulong)bVar5" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "pFVar1->iIdx = iAge;" (assignment_expression "pFVar1->iIdx = iAge" (field_expression "pFVar1->iIdx" identifier -> field_identifier) = identifier) ;) (expression_statement "pFVar1->bLookup = bLookup != 0;" (assignment_expression "pFVar1->bLookup = bLookup != 0" (field_expression "pFVar1->bLookup" identifier -> field_identifier) = (binary_expression "bLookup != 0" identifier != number_literal)) ;) (expression_statement "pFVar1->iStartBlock = iStartLeaf;" (assignment_expression "pFVar1->iStartBlock = iStartLeaf" (field_expression "pFVar1->iStartBlock" identifier -> field_identifier) = identifier) ;) (expression_statement "pFVar1->iLeafEndBlock = iEndLeaf;" (assignment_expression "pFVar1->iLeafEndBlock = iEndLeaf" (field_expression "pFVar1->iLeafEndBlock" identifier -> field_identifier) = identifier) ;) (expression_statement "pFVar1->iEndBlock = iEndBlock;" (assignment_expression "pFVar1->iEndBlock = iEndBlock" (field_expression "pFVar1->iEndBlock" identifier -> field_identifier) = identifier) ;) (if_statement "if (iVar4 == 0) {\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }\n    else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      pFVar1->iCurrentBlock = iStartLeaf + -1;\n    }" { (expression_statement "pFVar1->iCurrentBlock = iStartLeaf + -1;" (assignment_expression "pFVar1->iCurrentBlock = iStartLeaf + -1" (field_expression "pFVar1->iCurrentBlock" identifier -> field_identifier) = (binary_expression "iStartLeaf + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }" else (compound_statement "{\n      __dest = pFVar1 + 1;\n      pFVar1->aNode = (char *)__dest;\n      pFVar1->rootOnly = '\x01';\n      pFVar1->nNode = nRoot;\n      if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }\n      puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);\n      *puVar3 = 0;\n      puVar3[1] = 0;\n      *(undefined4 *)(puVar3 + 2) = 0;\n    }" { (expression_statement "__dest = pFVar1 + 1;" (assignment_expression "__dest = pFVar1 + 1" identifier = (binary_expression "pFVar1 + 1" identifier + number_literal)) ;) (expression_statement "pFVar1->aNode = (char *)__dest;" (assignment_expression "pFVar1->aNode = (char *)__dest" (field_expression "pFVar1->aNode" identifier -> field_identifier) = (cast_expression "(char *)__dest" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pFVar1->rootOnly = '\x01';" (assignment_expression "pFVar1->rootOnly = '\x01'" (field_expression "pFVar1->rootOnly" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "pFVar1->nNode = nRoot;" (assignment_expression "pFVar1->nNode = nRoot" (field_expression "pFVar1->nNode" identifier -> field_identifier) = identifier) ;) (if_statement "if (nRoot != 0) {\n        memcpy(__dest,zRoot,(long)nRoot);\n      }" if (parenthesized_expression "(nRoot != 0)" ( (binary_expression "nRoot != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest,zRoot,(long)nRoot);\n      }" { (expression_statement "memcpy(__dest,zRoot,(long)nRoot);" (call_expression "memcpy(__dest,zRoot,(long)nRoot)" identifier (argument_list "(__dest,zRoot,(long)nRoot)" ( identifier , identifier , (cast_expression "(long)nRoot" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) })) (expression_statement "puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot);" (assignment_expression "puVar3 = (undefined8 *)((long)&__dest->iIdx + (long)nRoot)" identifier = (cast_expression "(undefined8 *)((long)&__dest->iIdx + (long)nRoot)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)&__dest->iIdx + (long)nRoot)" ( (binary_expression "(long)&__dest->iIdx + (long)nRoot" (cast_expression "(long)&__dest->iIdx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&__dest->iIdx" & (field_expression "__dest->iIdx" identifier -> field_identifier))) + (cast_expression "(long)nRoot" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3[1] = 0;" (assignment_expression "puVar3[1] = 0" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined4 *)(puVar3 + 2) = 0;" (assignment_expression "*(undefined4 *)(puVar3 + 2) = 0" (pointer_expression "*(undefined4 *)(puVar3 + 2)" * (cast_expression "(undefined4 *)(puVar3 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 2)" ( (binary_expression "puVar3 + 2" identifier + number_literal) )))) = number_literal) ;) }))) (expression_statement "*ppReader = pFVar1;" (assignment_expression "*ppReader = pFVar1" (pointer_expression "*ppReader" * identifier) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "undefined8\nFUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)\n\n{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined8\nFUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)\n\n{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)" identifier (parameter_list "(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "void *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "int param_7" primitive_type identifier) , (parameter_declaration "long *param_8" (sized_type_specifier "long" long) (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}" { (declaration "undefined4 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte bVar6;" type_identifier identifier ;) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) (if_statement "if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }" { (if_statement "if (param_4 != 0) {\n      return 0x10b;\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n      return 0x10b;\n    }" { (return_statement "return 0x10b;" return number_literal ;) })) (expression_statement "iVar5 = param_7 + 0x14;" (assignment_expression "iVar5 = param_7 + 0x14" identifier = (binary_expression "param_7 + 0x14" identifier + number_literal)) ;) }) (else_clause "else {\n    iVar5 = 0;\n  }" else (compound_statement "{\n    iVar5 = 0;\n  }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) }))) (expression_statement "puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);" (assignment_expression "puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88)" identifier = (cast_expression "(undefined4 *)FUN_0014ae6c(iVar5 + 0x88)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0014ae6c(iVar5 + 0x88)" identifier (argument_list "(iVar5 + 0x88)" ( (binary_expression "iVar5 + 0x88" identifier + number_literal) ))))) ;) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar3 = 7;\n  }" { (expression_statement "uVar3 = 7;" (assignment_expression "uVar3 = 7" identifier = number_literal) ;) }) (else_clause "else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" else (compound_statement "{\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" { (expression_statement "*(undefined8 *)(puVar1 + 1) = 0;" (assignment_expression "*(undefined8 *)(puVar1 + 1) = 0" (pointer_expression "*(undefined8 *)(puVar1 + 1)" * (cast_expression "(undefined8 *)(puVar1 + 1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(puVar1 + 0x20) = 0;" (assignment_expression "*(undefined8 *)(puVar1 + 0x20) = 0" (pointer_expression "*(undefined8 *)(puVar1 + 0x20)" * (cast_expression "(undefined8 *)(puVar1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 0x20)" ( (binary_expression "puVar1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);" (assignment_expression "puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" identifier = (cast_expression "(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (binary_expression "(ulong)(puVar1 + 3) & 0xfffffffffffffff8" (call_expression "(ulong)(puVar1 + 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }" for ( (assignment_expression "uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" identifier = (call_expression "(ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" ( (binary_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3" (binary_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U" (parenthesized_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8))" ( (binary_expression "(int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (type_descriptor "int" primitive_type) ) (cast_expression "(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" ( (binary_expression "(ulong)(puVar1 + 3) & 0xfffffffffffffff8" (call_expression "(ulong)(puVar1 + 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))) & number_literal) ))))) )) + number_literal) >> number_literal) )))) ; (binary_expression "uVar4 != 0" identifier != number_literal) ; (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }" { (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (ulong)bVar6 * -2 + 1" identifier = (binary_expression "puVar2 + (ulong)bVar6 * -2 + 1" (binary_expression "puVar2 + (ulong)bVar6 * -2" identifier + (binary_expression "(ulong)bVar6 * -2" (cast_expression "(ulong)bVar6" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "*puVar1 = param_1;" (assignment_expression "*puVar1 = param_1" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*(bool *)(puVar1 + 1) = param_2 != 0;" (assignment_expression "*(bool *)(puVar1 + 1) = param_2 != 0" (pointer_expression "*(bool *)(puVar1 + 1)" * (cast_expression "(bool *)(puVar1 + 1)" ( (type_descriptor "bool *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = (binary_expression "param_2 != 0" identifier != number_literal)) ;) (expression_statement "*(long *)(puVar1 + 2) = param_3;" (assignment_expression "*(long *)(puVar1 + 2) = param_3" (pointer_expression "*(long *)(puVar1 + 2)" * (cast_expression "(long *)(puVar1 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 2)" ( (binary_expression "puVar1 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(puVar1 + 4) = param_4;" (assignment_expression "*(long *)(puVar1 + 4) = param_4" (pointer_expression "*(long *)(puVar1 + 4)" * (cast_expression "(long *)(puVar1 + 4)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 4)" ( (binary_expression "puVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(puVar1 + 6) = param_5;" (assignment_expression "*(undefined8 *)(puVar1 + 6) = param_5" (pointer_expression "*(undefined8 *)(puVar1 + 6)" * (cast_expression "(undefined8 *)(puVar1 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 6)" ( (binary_expression "puVar1 + 6" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }" { (expression_statement "*(long *)(puVar1 + 8) = param_3 + -1;" (assignment_expression "*(long *)(puVar1 + 8) = param_3 + -1" (pointer_expression "*(long *)(puVar1 + 8)" * (cast_expression "(long *)(puVar1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 8)" ( (binary_expression "puVar1 + 8" identifier + number_literal) )))) = (binary_expression "param_3 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" else (compound_statement "{\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" { (expression_statement "__dest = puVar1 + 0x22;" (assignment_expression "__dest = puVar1 + 0x22" identifier = (binary_expression "puVar1 + 0x22" identifier + number_literal)) ;) (expression_statement "*(undefined4 **)(puVar1 + 10) = __dest;" (assignment_expression "*(undefined4 **)(puVar1 + 10) = __dest" (pointer_expression "*(undefined4 **)(puVar1 + 10)" * (cast_expression "(undefined4 **)(puVar1 + 10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + 10)" ( (binary_expression "puVar1 + 10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)((long)puVar1 + 5) = 1;" (assignment_expression "*(undefined1 *)((long)puVar1 + 5) = 1" (pointer_expression "*(undefined1 *)((long)puVar1 + 5)" * (cast_expression "(undefined1 *)((long)puVar1 + 5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar1 + 5)" ( (binary_expression "(long)puVar1 + 5" (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar1[0xc] = param_7;" (assignment_expression "puVar1[0xc] = param_7" (subscript_expression "puVar1[0xc]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }" if (parenthesized_expression "(param_7 != 0)" ( (binary_expression "param_7 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest,param_6,(long)param_7);\n      }" { (expression_statement "memcpy(__dest,param_6,(long)param_7);" (call_expression "memcpy(__dest,param_6,(long)param_7)" identifier (argument_list "(__dest,param_6,(long)param_7)" ( identifier , identifier , (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) })) (expression_statement "puVar2 = (undefined8 *)((long)param_7 + (long)__dest);" (assignment_expression "puVar2 = (undefined8 *)((long)param_7 + (long)__dest)" identifier = (cast_expression "(undefined8 *)((long)param_7 + (long)__dest)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_7 + (long)__dest)" ( (binary_expression "(long)param_7 + (long)__dest" (cast_expression "(long)param_7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined4 *)(puVar2 + 2) = 0;" (assignment_expression "*(undefined4 *)(puVar2 + 2) = 0" (pointer_expression "*(undefined4 *)(puVar2 + 2)" * (cast_expression "(undefined4 *)(puVar2 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = number_literal) ;) }))) (expression_statement "*param_8 = (long)puVar1;" (assignment_expression "*param_8 = (long)puVar1" (pointer_expression "*param_8" * identifier) = (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_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 = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (for_statement for ( (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) ))))) )) + LIT) >> LIT) )))) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT != LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8\nFUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)\n\n{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}" (type_identifier "undefined8") (function_declarator "FUN_0014b547(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)" (identifier "FUN_0014b547") (parameter_list "(undefined4 param_1,int param_2,long param_3,long param_4,undefined8 param_5,\n            void *param_6,int param_7,long *param_8)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) (, ",") (parameter_declaration "long param_4" (sized_type_specifier "long" (long "long")) (identifier "param_4")) (, ",") (parameter_declaration "undefined8 param_5" (type_identifier "undefined8") (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")) (, ",") (parameter_declaration "long *param_8" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) () ")"))) (compound_statement "{\n  undefined4 *__dest;\n  undefined4 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  ulong uVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }\n  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);\n  if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }\n  return uVar3;\n}" ({ "{") (declaration "undefined4 *__dest;" (type_identifier "undefined4") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined8 *puVar2;" (type_identifier "undefined8") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "byte bVar6;" (type_identifier "byte") (identifier "bVar6") (; ";")) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" (identifier "bVar6") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_3 == 0) {\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }\n  else {\n    iVar5 = 0;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_4 != 0) {\n      return 0x10b;\n    }\n    iVar5 = param_7 + 0x14;\n  }" ({ "{") (if_statement "if (param_4 != 0) {\n      return 0x10b;\n    }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return 0x10b;\n    }" ({ "{") (return_statement "return 0x10b;" (return "return") (number_literal "0x10b") (; ";")) (} "}"))) (expression_statement "iVar5 = param_7 + 0x14;" (assignment_expression "iVar5 = param_7 + 0x14" (identifier "iVar5") (= "=") (binary_expression "param_7 + 0x14" (identifier "param_7") (+ "+") (number_literal "0x14"))) (; ";")) (} "}")) (else_clause "else {\n    iVar5 = 0;\n  }" (else "else") (compound_statement "{\n    iVar5 = 0;\n  }" ({ "{") (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);" (assignment_expression "puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_0014ae6c(iVar5 + 0x88)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0014ae6c(iVar5 + 0x88)" (identifier "FUN_0014ae6c") (argument_list "(iVar5 + 0x88)" (( "(") (binary_expression "iVar5 + 0x88" (identifier "iVar5") (+ "+") (number_literal "0x88")) () ")"))))) (; ";")) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n    uVar3 = 7;\n  }\n  else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" (if "if") (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 == (undefined4 *)0x0" (identifier "puVar1") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar3 = 7;\n  }" ({ "{") (expression_statement "uVar3 = 7;" (assignment_expression "uVar3 = 7" (identifier "uVar3") (= "=") (number_literal "7")) (; ";")) (} "}")) (else_clause "else {\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" (else "else") (compound_statement "{\n    *(undefined8 *)(puVar1 + 1) = 0;\n    *(undefined8 *)(puVar1 + 0x20) = 0;\n    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);\n    for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }\n    *puVar1 = param_1;\n    *(bool *)(puVar1 + 1) = param_2 != 0;\n    *(long *)(puVar1 + 2) = param_3;\n    *(long *)(puVar1 + 4) = param_4;\n    *(undefined8 *)(puVar1 + 6) = param_5;\n    if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }\n    *param_8 = (long)puVar1;\n    uVar3 = 0;\n  }" ({ "{") (expression_statement "*(undefined8 *)(puVar1 + 1) = 0;" (assignment_expression "*(undefined8 *)(puVar1 + 1) = 0" (pointer_expression "*(undefined8 *)(puVar1 + 1)" (* "*") (cast_expression "(undefined8 *)(puVar1 + 1)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined8 *)(puVar1 + 0x20) = 0;" (assignment_expression "*(undefined8 *)(puVar1 + 0x20) = 0" (pointer_expression "*(undefined8 *)(puVar1 + 0x20)" (* "*") (cast_expression "(undefined8 *)(puVar1 + 0x20)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 0x20)" (( "(") (binary_expression "puVar1 + 0x20" (identifier "puVar1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);" (assignment_expression "puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (( "(") (binary_expression "(ulong)(puVar1 + 3) & 0xfffffffffffffff8" (call_expression "(ulong)(puVar1 + 3)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(puVar1 + 3)" (( "(") (binary_expression "puVar1 + 3" (identifier "puVar1") (+ "+") (number_literal "3")) () ")"))) (& "&") (number_literal "0xfffffffffffffff8")) () ")")))) (; ";")) (for_statement "for (uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        ); uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }" (for "for") (( "(") (assignment_expression "uVar4 = (ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" (identifier "uVar4") (= "=") (call_expression "(ulong)(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3\n                        )" (( "(") (binary_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3" (binary_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U" (parenthesized_expression "((int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8))" (( "(") (binary_expression "(int)puVar1 -\n                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (- "-") (cast_expression "(int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((ulong)(puVar1 + 3) & 0xfffffffffffffff8)" (( "(") (binary_expression "(ulong)(puVar1 + 3) & 0xfffffffffffffff8" (call_expression "(ulong)(puVar1 + 3)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(puVar1 + 3)" (( "(") (binary_expression "puVar1 + 3" (identifier "puVar1") (+ "+") (number_literal "3")) () ")"))) (& "&") (number_literal "0xfffffffffffffff8")) () ")"))))) () ")")) (+ "+") (number_literal "0x88U")) (>> ">>") (number_literal "3")) () ")")))) (; ";") (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar4 = uVar4 - 1" (identifier "uVar4") (= "=") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n      *puVar2 = 0;\n      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;\n    }" ({ "{") (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;" (assignment_expression "puVar2 = puVar2 + (ulong)bVar6 * -2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + (ulong)bVar6 * -2 + 1" (binary_expression "puVar2 + (ulong)bVar6 * -2" (identifier "puVar2") (+ "+") (binary_expression "(ulong)bVar6 * -2" (cast_expression "(ulong)bVar6" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar6")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "*puVar1 = param_1;" (assignment_expression "*puVar1 = param_1" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*(bool *)(puVar1 + 1) = param_2 != 0;" (assignment_expression "*(bool *)(puVar1 + 1) = param_2 != 0" (pointer_expression "*(bool *)(puVar1 + 1)" (* "*") (cast_expression "(bool *)(puVar1 + 1)" (( "(") (type_descriptor "bool *" (primitive_type "bool") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")")))) (= "=") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0"))) (; ";")) (expression_statement "*(long *)(puVar1 + 2) = param_3;" (assignment_expression "*(long *)(puVar1 + 2) = param_3" (pointer_expression "*(long *)(puVar1 + 2)" (* "*") (cast_expression "(long *)(puVar1 + 2)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 2)" (( "(") (binary_expression "puVar1 + 2" (identifier "puVar1") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "*(long *)(puVar1 + 4) = param_4;" (assignment_expression "*(long *)(puVar1 + 4) = param_4" (pointer_expression "*(long *)(puVar1 + 4)" (* "*") (cast_expression "(long *)(puVar1 + 4)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 4)" (( "(") (binary_expression "puVar1 + 4" (identifier "puVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "param_4")) (; ";")) (expression_statement "*(undefined8 *)(puVar1 + 6) = param_5;" (assignment_expression "*(undefined8 *)(puVar1 + 6) = param_5" (pointer_expression "*(undefined8 *)(puVar1 + 6)" (* "*") (cast_expression "(undefined8 *)(puVar1 + 6)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 6)" (( "(") (binary_expression "puVar1 + 6" (identifier "puVar1") (+ "+") (number_literal "6")) () ")")))) (= "=") (identifier "param_5")) (; ";")) (if_statement "if (iVar5 == 0) {\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }\n    else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(long *)(puVar1 + 8) = param_3 + -1;\n    }" ({ "{") (expression_statement "*(long *)(puVar1 + 8) = param_3 + -1;" (assignment_expression "*(long *)(puVar1 + 8) = param_3 + -1" (pointer_expression "*(long *)(puVar1 + 8)" (* "*") (cast_expression "(long *)(puVar1 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 8)" (( "(") (binary_expression "puVar1 + 8" (identifier "puVar1") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "param_3 + -1" (identifier "param_3") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" (else "else") (compound_statement "{\n      __dest = puVar1 + 0x22;\n      *(undefined4 **)(puVar1 + 10) = __dest;\n      *(undefined1 *)((long)puVar1 + 5) = 1;\n      puVar1[0xc] = param_7;\n      if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }\n      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);\n      *puVar2 = 0;\n      puVar2[1] = 0;\n      *(undefined4 *)(puVar2 + 2) = 0;\n    }" ({ "{") (expression_statement "__dest = puVar1 + 0x22;" (assignment_expression "__dest = puVar1 + 0x22" (identifier "__dest") (= "=") (binary_expression "puVar1 + 0x22" (identifier "puVar1") (+ "+") (number_literal "0x22"))) (; ";")) (expression_statement "*(undefined4 **)(puVar1 + 10) = __dest;" (assignment_expression "*(undefined4 **)(puVar1 + 10) = __dest" (pointer_expression "*(undefined4 **)(puVar1 + 10)" (* "*") (cast_expression "(undefined4 **)(puVar1 + 10)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar1 + 10)" (( "(") (binary_expression "puVar1 + 10" (identifier "puVar1") (+ "+") (number_literal "10")) () ")")))) (= "=") (identifier "__dest")) (; ";")) (expression_statement "*(undefined1 *)((long)puVar1 + 5) = 1;" (assignment_expression "*(undefined1 *)((long)puVar1 + 5) = 1" (pointer_expression "*(undefined1 *)((long)puVar1 + 5)" (* "*") (cast_expression "(undefined1 *)((long)puVar1 + 5)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar1 + 5)" (( "(") (binary_expression "(long)puVar1 + 5" (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1")) (+ "+") (number_literal "5")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar1[0xc] = param_7;" (assignment_expression "puVar1[0xc] = param_7" (subscript_expression "puVar1[0xc]" (identifier "puVar1") ([ "[") (number_literal "0xc") (] "]")) (= "=") (identifier "param_7")) (; ";")) (if_statement "if (param_7 != 0) {\n        memcpy(__dest,param_6,(long)param_7);\n      }" (if "if") (parenthesized_expression "(param_7 != 0)" (( "(") (binary_expression "param_7 != 0" (identifier "param_7") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        memcpy(__dest,param_6,(long)param_7);\n      }" ({ "{") (expression_statement "memcpy(__dest,param_6,(long)param_7);" (call_expression "memcpy(__dest,param_6,(long)param_7)" (identifier "memcpy") (argument_list "(__dest,param_6,(long)param_7)" (( "(") (identifier "__dest") (, ",") (identifier "param_6") (, ",") (cast_expression "(long)param_7" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_7")) () ")"))) (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined8 *)((long)param_7 + (long)__dest);" (assignment_expression "puVar2 = (undefined8 *)((long)param_7 + (long)__dest)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)((long)param_7 + (long)__dest)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_7 + (long)__dest)" (( "(") (binary_expression "(long)param_7 + (long)__dest" (cast_expression "(long)param_7" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_7")) (+ "+") (cast_expression "(long)__dest" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__dest"))) () ")")))) (; ";")) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(puVar2 + 2) = 0;" (assignment_expression "*(undefined4 *)(puVar2 + 2) = 0" (pointer_expression "*(undefined4 *)(puVar2 + 2)" (* "*") (cast_expression "(undefined4 *)(puVar2 + 2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + 2)" (( "(") (binary_expression "puVar2 + 2" (identifier "puVar2") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "*param_8 = (long)puVar1;" (assignment_expression "*param_8 = (long)puVar1" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1"))) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (} "}")))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

int function_1
              (int iAge,int var_9,type_1 var_1,type_1 var_2,
              type_1 iEndBlock,char *zRoot,int var_3,type_2 **ppReader)

{
  type_2 *__dest;
  type_2 *var_6;
  type_3 var_7;
  type_4 *var_8;
  int var_5;
  type_5 bVar5;
  
  bVar5 = 0;
  if (var_1 == 0) {
    if (var_2 != 0) {
      return 0x10b;
    }
    var_5 = var_3 + 0x14;
  }
  else {
    var_5 = 0;
  }
  var_6 = (type_2 *)var_4(var_5 + 0x88);
  if (var_6 == (type_2 *)0x0) {
    var_5 = 7;
  }
  else {
    *(type_4 *)&var_6->var_9 = 0;
    var_6->iDocid = 0;
    var_8 = (type_4 *)((type_3)((long)&var_6->iStartBlock + 4U) & 0xfffffffffffffff8);
    var_7 = (type_3)(((int)var_6 - (int)var_8) + 0x88U >> 3);
    for (; var_7 != 0; var_7 = var_7 - 1) {
      *var_8 = 0;
      var_8 = var_8 + (type_3)bVar5 * -2 + 1;
    }
    var_6->iIdx = iAge;
    var_6->var_9 = var_9 != 0;
    var_6->iStartBlock = var_1;
    var_6->iLeafEndBlock = var_2;
    var_6->iEndBlock = iEndBlock;
    if (var_5 == 0) {
      var_6->iCurrentBlock = var_1 + -1;
    }
    else {
      __dest = var_6 + 1;
      var_6->aNode = (char *)__dest;
      var_6->rootOnly = '\x01';
      var_6->nNode = var_3;
      if (var_3 != 0) {
        var_10(__dest,zRoot,(long)var_3);
      }
      var_8 = (type_4 *)((long)&__dest->iIdx + (long)var_3);
      *var_8 = 0;
      var_8[1] = 0;
      *(type_6 *)(var_8 + 2) = 0;
    }
    *ppReader = var_6;
    var_5 = 0;
  }
  return var_5;
}


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

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

{
  undefined4 *__dest;
  undefined4 *puVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  ulong uVar4;
  int iVar5;
  byte bVar6;
  
  bVar6 = 0;
  if (param_3 == 0) {
    if (param_4 != 0) {
      return 0x10b;
    }
    iVar5 = param_7 + 0x14;
  }
  else {
    iVar5 = 0;
  }
  puVar1 = (undefined4 *)FUN_0014ae6c(iVar5 + 0x88);
  if (puVar1 == (undefined4 *)0x0) {
    uVar3 = 7;
  }
  else {
    *(undefined8 *)(puVar1 + 1) = 0;
    *(undefined8 *)(puVar1 + 0x20) = 0;
    puVar2 = (undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8);
    for (uVar4 = (ulong)(((int)puVar1 -
                         (int)(undefined8 *)((ulong)(puVar1 + 3) & 0xfffffffffffffff8)) + 0x88U >> 3
                        ); uVar4 != 0; uVar4 = uVar4 - 1) {
      *puVar2 = 0;
      puVar2 = puVar2 + (ulong)bVar6 * -2 + 1;
    }
    *puVar1 = param_1;
    *(bool *)(puVar1 + 1) = param_2 != 0;
    *(long *)(puVar1 + 2) = param_3;
    *(long *)(puVar1 + 4) = param_4;
    *(undefined8 *)(puVar1 + 6) = param_5;
    if (iVar5 == 0) {
      *(long *)(puVar1 + 8) = param_3 + -1;
    }
    else {
      __dest = puVar1 + 0x22;
      *(undefined4 **)(puVar1 + 10) = __dest;
      *(undefined1 *)((long)puVar1 + 5) = 1;
      puVar1[0xc] = param_7;
      if (param_7 != 0) {
        memcpy(__dest,param_6,(long)param_7);
      }
      puVar2 = (undefined8 *)((long)param_7 + (long)__dest);
      *puVar2 = 0;
      puVar2[1] = 0;
      *(undefined4 *)(puVar2 + 2) = 0;
    }
    *param_8 = (long)puVar1;
    uVar3 = 0;
  }
  return uVar3;
}

