
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

void __regparm3 unixShmPurge(unixFile *pFd)

{
  char **ppcVar1;
  unixShmNode *p;
  int iVar2;
  int lineno;
  int iVar3;
  
  p = pFd->pInode->pShmNode;
  if ((p != (unixShmNode *)0x0) && (p->nRef == 0)) {
    iVar2 = (*aSyscall[0x19].pCurrent)();
    iVar3 = iVar2 >> 0xf;
    if (iVar2 < 0x8000) {
      iVar3 = 1;
    }
    if (p->pShmMutex != (sqlite3_mutex *)0x0) {
      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);
    }
    iVar2 = 0;
    if (p->nRegion != 0) {
      do {
        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {
          iVar2 = iVar2 + iVar3;
          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);
          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;
        }
        iVar2 = iVar2 + iVar3;
        sqlite3_free(*ppcVar1);
      } while (iVar2 < (int)(uint)p->nRegion);
    }
LAB_00071d85:
    sqlite3_free(p->apRegion);
    if (-1 < p->hShm) {
      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);
      if (iVar2 != 0) {
        robust_close(pFd,0x8fb0,lineno);
      }
      p->hShm = -1;
    }
    p->pInode->pShmNode = (unixShmNode *)0x0;
    sqlite3_free(p);
  }
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

void __regparm3 FUN_00071ce0(int param_1)

{
  int *piVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);
  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {
    iVar3 = (*(code *)PTR_FUN_0017d870)();
    iVar4 = iVar3 >> 0xf;
    if (iVar3 < 0x8000) {
      iVar4 = 1;
    }
    if (piVar1[1] != 0) {
      (*DAT_0017c438)(piVar1[1]);
    }
    iVar3 = 0;
    if ((short)piVar1[5] != 0) {
      do {
        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {
          iVar3 = iVar3 + iVar4;
          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);
          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;
        }
        iVar3 = iVar3 + iVar4;
        FUN_00042800(uVar2);
      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));
    }
LAB_00071d85:
    FUN_00042800(piVar1[6]);
    if (-1 < piVar1[3]) {
      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);
      if (iVar3 != 0) {
        FUN_00071ca0();
      }
      piVar1[3] = -1;
    }
    *(undefined4 *)(*piVar1 + 0x28) = 0;
    FUN_00042800(piVar1);
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
CALL 0x00115708
ADD ESI,0x10a140
PUSH EBX
SUB ESP,0x1c
MOV EDX,dword ptr [EAX + 0x8]
MOV EBX,dword ptr [EDX + 0x28]
TEST EBX,EBX
JZ 0x00071dc7
MOV EBP,dword ptr [EBX + 0x1c]
TEST EBP,EBP
JNZ 0x00071dc7
MOV dword ptr [ESP + 0xc],EAX
CALL dword ptr [ESI + 0x1a48]
MOV EDI,EAX
SAR EDI,0xf
CMP EAX,0x7fff
MOV EAX,0x1
CMOVLE EDI,EAX
MOV EAX,dword ptr [EBX + 0x4]
TEST EAX,EAX
JZ 0x00071d3b
SUB ESP,0xc
PUSH EAX
CALL dword ptr [ESI + 0x610]
ADD ESP,0x10
CMP word ptr [EBX + 0x14],0x0
JNZ 0x00071d62
JMP 0x00071d85
SUB ESP,0x8
PUSH dword ptr [EBX + 0x10]
ADD EBP,EDI
PUSH EAX
CALL dword ptr [ESI + 0x1a30]
MOVZX EAX,word ptr [EBX + 0x14]
ADD ESP,0x10
CMP EAX,EBP
JLE 0x00071d85
MOV EAX,dword ptr [EBX + 0x18]
MOV EDX,dword ptr [EBX + 0xc]
MOV EAX,dword ptr [EAX + EBP*0x4]
TEST EDX,EDX
JNS 0x00071d48
SUB ESP,0xc
ADD EBP,EDI
PUSH EAX
CALL 0x00042800
MOVZX EAX,word ptr [EBX + 0x14]
ADD ESP,0x10
CMP EAX,EBP
JG 0x00071d62
SUB ESP,0xc
PUSH dword ptr [EBX + 0x18]
CALL 0x00042800
MOV EAX,dword ptr [EBX + 0xc]
ADD ESP,0x10
TEST EAX,EAX
JS 0x00071db2
SUB ESP,0xc
PUSH EAX
CALL dword ptr [ESI + 0x1928]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00071dd0
MOV dword ptr [EBX + 0xc],0xffffffff
MOV EAX,dword ptr [EBX]
SUB ESP,0xc
MOV dword ptr [EAX + 0x28],0x0
PUSH EBX
CALL 0x00042800
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0xc]
MOV EDX,0x8fb0
CALL 0x00071ca0
JMP 0x00071dab
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nvoid __regparm3 FUN_00071ce0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00071ce0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00071ce0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);" (assignment_expression "piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28)" identifier = (pointer_expression "*(int **)(*(int *)(param_1 + 8) + 0x28)" * (cast_expression "(int **)(*(int *)(param_1 + 8) + 0x28)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 8) + 0x28)" ( (binary_expression "*(int *)(param_1 + 8) + 0x28" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }" if (parenthesized_expression "((piVar1 != (int *)0x0) && (piVar1[7] == 0))" ( (binary_expression "(piVar1 != (int *)0x0) && (piVar1[7] == 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(piVar1[7] == 0)" ( (binary_expression "piVar1[7] == 0" (subscript_expression "piVar1[7]" identifier [ number_literal ]) == number_literal) ))) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }" { (expression_statement "iVar3 = (*(code *)PTR_FUN_0017d870)();" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0017d870)()" identifier = (call_expression "(*(code *)PTR_FUN_0017d870)()" (parenthesized_expression "(*(code *)PTR_FUN_0017d870)" ( (pointer_expression "*(code *)PTR_FUN_0017d870" * (cast_expression "(code *)PTR_FUN_0017d870" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "iVar4 = iVar3 >> 0xf;" (assignment_expression "iVar4 = iVar3 >> 0xf" identifier = (binary_expression "iVar3 >> 0xf" identifier >> number_literal)) ;) (if_statement "if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }" if (parenthesized_expression "(iVar3 < 0x8000)" ( (binary_expression "iVar3 < 0x8000" identifier < number_literal) )) (compound_statement "{\n      iVar4 = 1;\n    }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) })) (if_statement "if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }" if (parenthesized_expression "(piVar1[1] != 0)" ( (binary_expression "piVar1[1] != 0" (subscript_expression "piVar1[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      (*DAT_0017c438)(piVar1[1]);\n    }" { (expression_statement "(*DAT_0017c438)(piVar1[1]);" (call_expression "(*DAT_0017c438)(piVar1[1])" (parenthesized_expression "(*DAT_0017c438)" ( (pointer_expression "*DAT_0017c438" * identifier) )) (argument_list "(piVar1[1])" ( (subscript_expression "piVar1[1]" identifier [ number_literal ]) ))) ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }" if (parenthesized_expression "((short)piVar1[5] != 0)" ( (binary_expression "(short)piVar1[5] != 0" (cast_expression "(short)piVar1[5]" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (subscript_expression "piVar1[5]" identifier [ number_literal ])) != number_literal) )) (compound_statement "{\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }" { (do_statement "do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));" do (compound_statement "{\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      }" { (while_statement "while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }" while (parenthesized_expression "(uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3])" ( (comma_expression "uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]" (assignment_expression "uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4)" identifier = (pointer_expression "*(undefined4 *)(piVar1[6] + iVar3 * 4)" * (cast_expression "(undefined4 *)(piVar1[6] + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1[6] + iVar3 * 4)" ( (binary_expression "piVar1[6] + iVar3 * 4" (subscript_expression "piVar1[6]" identifier [ number_literal ]) + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))) , (binary_expression "-1 < piVar1[3]" number_literal < (subscript_expression "piVar1[3]" identifier [ number_literal ]))) )) (compound_statement "{\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }" { (expression_statement "iVar3 = iVar3 + iVar4;" (assignment_expression "iVar3 = iVar3 + iVar4" identifier = (binary_expression "iVar3 + iVar4" identifier + identifier)) ;) (expression_statement "(*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);" (call_expression "(*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4])" (parenthesized_expression "(*(code *)PTR_munmap_0017d858)" ( (pointer_expression "*(code *)PTR_munmap_0017d858" * (cast_expression "(code *)PTR_munmap_0017d858" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,piVar1[4])" ( identifier , (subscript_expression "piVar1[4]" identifier [ number_literal ]) ))) ;) (if_statement "if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;" if (parenthesized_expression "((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3)" ( (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5) <= iVar3" (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(piVar1 + 5)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 5)" ( (binary_expression "piVar1 + 5" identifier + number_literal) )))) <= identifier) )) (goto_statement "goto LAB_00071d85;" goto statement_identifier ;)) })) (expression_statement "iVar3 = iVar3 + iVar4;" (assignment_expression "iVar3 = iVar3 + iVar4" identifier = (binary_expression "iVar3 + iVar4" identifier + identifier)) ;) (expression_statement "FUN_00042800(uVar2);" (call_expression "FUN_00042800(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) }) while (parenthesized_expression "(iVar3 < (int)(uint)*(ushort *)(piVar1 + 5))" ( (binary_expression "iVar3 < (int)(uint)*(ushort *)(piVar1 + 5)" identifier < (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(piVar1 + 5)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 5)" ( (binary_expression "piVar1 + 5" identifier + number_literal) ))))) )) ;) })) (labeled_statement "LAB_00071d85:\n    FUN_00042800(piVar1[6]);" statement_identifier : (expression_statement "FUN_00042800(piVar1[6]);" (call_expression "FUN_00042800(piVar1[6])" identifier (argument_list "(piVar1[6])" ( (subscript_expression "piVar1[6]" identifier [ number_literal ]) ))) ;)) (if_statement "if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }" if (parenthesized_expression "(-1 < piVar1[3])" ( (binary_expression "-1 < piVar1[3]" number_literal < (subscript_expression "piVar1[3]" identifier [ number_literal ])) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }" { (expression_statement "iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);" (assignment_expression "iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3])" identifier = (call_expression "(*(code *)PTR_close_0017d750)(piVar1[3])" (parenthesized_expression "(*(code *)PTR_close_0017d750)" ( (pointer_expression "*(code *)PTR_close_0017d750" * (cast_expression "(code *)PTR_close_0017d750" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar1[3])" ( (subscript_expression "piVar1[3]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar3 != 0) {\n        FUN_00071ca0();\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_00071ca0();\n      }" { (expression_statement "FUN_00071ca0();" (call_expression "FUN_00071ca0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "piVar1[3] = -1;" (assignment_expression "piVar1[3] = -1" (subscript_expression "piVar1[3]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "*(undefined4 *)(*piVar1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(*piVar1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(*piVar1 + 0x28)" * (cast_expression "(undefined4 *)(*piVar1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + 0x28)" ( (binary_expression "*piVar1 + 0x28" (pointer_expression "*piVar1" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_00042800(piVar1);" (call_expression "FUN_00042800(piVar1)" identifier (argument_list "(piVar1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nvoid __regparm3 unixShmPurge(unixFile *pFd)\n\n{\n  char **ppcVar1;\n  unixShmNode *p;\n  int iVar2;\n  int lineno;\n  int iVar3;\n  \n  p = pFd->pInode->pShmNode;\n  if ((p != (unixShmNode *)0x0) && (p->nRef == 0)) {\n    iVar2 = (*aSyscall[0x19].pCurrent)();\n    iVar3 = iVar2 >> 0xf;\n    if (iVar2 < 0x8000) {\n      iVar3 = 1;\n    }\n    if (p->pShmMutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);\n    }\n    iVar2 = 0;\n    if (p->nRegion != 0) {\n      do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);\n    }\nLAB_00071d85:\n    sqlite3_free(p->apRegion);\n    if (-1 < p->hShm) {\n      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);\n      if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }\n      p->hShm = -1;\n    }\n    p->pInode->pShmNode = (unixShmNode *)0x0;\n    sqlite3_free(p);\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 unixShmPurge(unixFile *pFd)\n\n{\n  char **ppcVar1;\n  unixShmNode *p;\n  int iVar2;\n  int lineno;\n  int iVar3;\n  \n  p = pFd->pInode->pShmNode;\n  if ((p != (unixShmNode *)0x0) && (p->nRef == 0)) {\n    iVar2 = (*aSyscall[0x19].pCurrent)();\n    iVar3 = iVar2 >> 0xf;\n    if (iVar2 < 0x8000) {\n      iVar3 = 1;\n    }\n    if (p->pShmMutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);\n    }\n    iVar2 = 0;\n    if (p->nRegion != 0) {\n      do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);\n    }\nLAB_00071d85:\n    sqlite3_free(p->apRegion);\n    if (-1 < p->hShm) {\n      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);\n      if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }\n      p->hShm = -1;\n    }\n    p->pInode->pShmNode = (unixShmNode *)0x0;\n    sqlite3_free(p);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "unixShmPurge(unixFile *pFd)" identifier (parameter_list "(unixFile *pFd)" ( (parameter_declaration "unixFile *pFd" type_identifier (pointer_declarator "*pFd" * identifier)) ))) (compound_statement "{\n  char **ppcVar1;\n  unixShmNode *p;\n  int iVar2;\n  int lineno;\n  int iVar3;\n  \n  p = pFd->pInode->pShmNode;\n  if ((p != (unixShmNode *)0x0) && (p->nRef == 0)) {\n    iVar2 = (*aSyscall[0x19].pCurrent)();\n    iVar3 = iVar2 >> 0xf;\n    if (iVar2 < 0x8000) {\n      iVar3 = 1;\n    }\n    if (p->pShmMutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);\n    }\n    iVar2 = 0;\n    if (p->nRegion != 0) {\n      do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);\n    }\nLAB_00071d85:\n    sqlite3_free(p->apRegion);\n    if (-1 < p->hShm) {\n      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);\n      if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }\n      p->hShm = -1;\n    }\n    p->pInode->pShmNode = (unixShmNode *)0x0;\n    sqlite3_free(p);\n  }\n  return;\n}" { (declaration "char **ppcVar1;" primitive_type (pointer_declarator "**ppcVar1" * (pointer_declarator "*ppcVar1" * identifier)) ;) (declaration "unixShmNode *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int lineno;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "p = pFd->pInode->pShmNode;" (assignment_expression "p = pFd->pInode->pShmNode" identifier = (field_expression "pFd->pInode->pShmNode" (field_expression "pFd->pInode" identifier -> field_identifier) -> field_identifier)) ;) (if_statement "if ((p != (unixShmNode *)0x0) && (p->nRef == 0)) {\n    iVar2 = (*aSyscall[0x19].pCurrent)();\n    iVar3 = iVar2 >> 0xf;\n    if (iVar2 < 0x8000) {\n      iVar3 = 1;\n    }\n    if (p->pShmMutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);\n    }\n    iVar2 = 0;\n    if (p->nRegion != 0) {\n      do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);\n    }\nLAB_00071d85:\n    sqlite3_free(p->apRegion);\n    if (-1 < p->hShm) {\n      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);\n      if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }\n      p->hShm = -1;\n    }\n    p->pInode->pShmNode = (unixShmNode *)0x0;\n    sqlite3_free(p);\n  }" if (parenthesized_expression "((p != (unixShmNode *)0x0) && (p->nRef == 0))" ( (binary_expression "(p != (unixShmNode *)0x0) && (p->nRef == 0)" (parenthesized_expression "(p != (unixShmNode *)0x0)" ( (binary_expression "p != (unixShmNode *)0x0" identifier != (cast_expression "(unixShmNode *)0x0" ( (type_descriptor "unixShmNode *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(p->nRef == 0)" ( (binary_expression "p->nRef == 0" (field_expression "p->nRef" identifier -> field_identifier) == number_literal) ))) )) (compound_statement "{\n    iVar2 = (*aSyscall[0x19].pCurrent)();\n    iVar3 = iVar2 >> 0xf;\n    if (iVar2 < 0x8000) {\n      iVar3 = 1;\n    }\n    if (p->pShmMutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);\n    }\n    iVar2 = 0;\n    if (p->nRegion != 0) {\n      do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);\n    }\nLAB_00071d85:\n    sqlite3_free(p->apRegion);\n    if (-1 < p->hShm) {\n      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);\n      if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }\n      p->hShm = -1;\n    }\n    p->pInode->pShmNode = (unixShmNode *)0x0;\n    sqlite3_free(p);\n  }" { (expression_statement "iVar2 = (*aSyscall[0x19].pCurrent)();" (assignment_expression "iVar2 = (*aSyscall[0x19].pCurrent)()" identifier = (call_expression "(*aSyscall[0x19].pCurrent)()" (parenthesized_expression "(*aSyscall[0x19].pCurrent)" ( (pointer_expression "*aSyscall[0x19].pCurrent" * (field_expression "aSyscall[0x19].pCurrent" (subscript_expression "aSyscall[0x19]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "iVar3 = iVar2 >> 0xf;" (assignment_expression "iVar3 = iVar2 >> 0xf" identifier = (binary_expression "iVar2 >> 0xf" identifier >> number_literal)) ;) (if_statement "if (iVar2 < 0x8000) {\n      iVar3 = 1;\n    }" if (parenthesized_expression "(iVar2 < 0x8000)" ( (binary_expression "iVar2 < 0x8000" identifier < number_literal) )) (compound_statement "{\n      iVar3 = 1;\n    }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (if_statement "if (p->pShmMutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);\n    }" if (parenthesized_expression "(p->pShmMutex != (sqlite3_mutex *)0x0)" ( (binary_expression "p->pShmMutex != (sqlite3_mutex *)0x0" (field_expression "p->pShmMutex" identifier -> field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);\n    }" { (expression_statement "(*sqlite3Config.mutex.xMutexFree)(p->pShmMutex);" (call_expression "(*sqlite3Config.mutex.xMutexFree)(p->pShmMutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexFree)" ( (pointer_expression "*sqlite3Config.mutex.xMutexFree" * (field_expression "sqlite3Config.mutex.xMutexFree" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(p->pShmMutex)" ( (field_expression "p->pShmMutex" identifier -> field_identifier) ))) ;) })) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if (p->nRegion != 0) {\n      do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);\n    }" if (parenthesized_expression "(p->nRegion != 0)" ( (binary_expression "p->nRegion != 0" (field_expression "p->nRegion" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n      do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);\n    }" { (do_statement "do {\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      } while (iVar2 < (int)(uint)p->nRegion);" do (compound_statement "{\n        while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }\n        iVar2 = iVar2 + iVar3;\n        sqlite3_free(*ppcVar1);\n      }" { (while_statement "while (ppcVar1 = p->apRegion + iVar2, -1 < p->hShm) {\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }" while (parenthesized_expression "(ppcVar1 = p->apRegion + iVar2, -1 < p->hShm)" ( (comma_expression "ppcVar1 = p->apRegion + iVar2, -1 < p->hShm" (assignment_expression "ppcVar1 = p->apRegion + iVar2" identifier = (binary_expression "p->apRegion + iVar2" (field_expression "p->apRegion" identifier -> field_identifier) + identifier)) , (binary_expression "-1 < p->hShm" number_literal < (field_expression "p->hShm" identifier -> field_identifier))) )) (compound_statement "{\n          iVar2 = iVar2 + iVar3;\n          (*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);\n          if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;\n        }" { (expression_statement "iVar2 = iVar2 + iVar3;" (assignment_expression "iVar2 = iVar2 + iVar3" identifier = (binary_expression "iVar2 + iVar3" identifier + identifier)) ;) (expression_statement "(*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion);" (call_expression "(*aSyscall[0x17].pCurrent)(*ppcVar1,p->szRegion)" (parenthesized_expression "(*aSyscall[0x17].pCurrent)" ( (pointer_expression "*aSyscall[0x17].pCurrent" * (field_expression "aSyscall[0x17].pCurrent" (subscript_expression "aSyscall[0x17]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(*ppcVar1,p->szRegion)" ( (pointer_expression "*ppcVar1" * identifier) , (field_expression "p->szRegion" identifier -> field_identifier) ))) ;) (if_statement "if ((int)(uint)p->nRegion <= iVar2) goto LAB_00071d85;" if (parenthesized_expression "((int)(uint)p->nRegion <= iVar2)" ( (binary_expression "(int)(uint)p->nRegion <= iVar2" (cast_expression "(int)(uint)p->nRegion" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)p->nRegion" ( (type_descriptor "uint" type_identifier) ) (field_expression "p->nRegion" identifier -> field_identifier))) <= identifier) )) (goto_statement "goto LAB_00071d85;" goto statement_identifier ;)) })) (expression_statement "iVar2 = iVar2 + iVar3;" (assignment_expression "iVar2 = iVar2 + iVar3" identifier = (binary_expression "iVar2 + iVar3" identifier + identifier)) ;) (expression_statement "sqlite3_free(*ppcVar1);" (call_expression "sqlite3_free(*ppcVar1)" identifier (argument_list "(*ppcVar1)" ( (pointer_expression "*ppcVar1" * identifier) ))) ;) }) while (parenthesized_expression "(iVar2 < (int)(uint)p->nRegion)" ( (binary_expression "iVar2 < (int)(uint)p->nRegion" identifier < (cast_expression "(int)(uint)p->nRegion" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)p->nRegion" ( (type_descriptor "uint" type_identifier) ) (field_expression "p->nRegion" identifier -> field_identifier)))) )) ;) })) (labeled_statement "LAB_00071d85:\n    sqlite3_free(p->apRegion);" statement_identifier : (expression_statement "sqlite3_free(p->apRegion);" (call_expression "sqlite3_free(p->apRegion)" identifier (argument_list "(p->apRegion)" ( (field_expression "p->apRegion" identifier -> field_identifier) ))) ;)) (if_statement "if (-1 < p->hShm) {\n      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);\n      if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }\n      p->hShm = -1;\n    }" if (parenthesized_expression "(-1 < p->hShm)" ( (binary_expression "-1 < p->hShm" number_literal < (field_expression "p->hShm" identifier -> field_identifier)) )) (compound_statement "{\n      iVar2 = (*aSyscall[1].pCurrent)(p->hShm);\n      if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }\n      p->hShm = -1;\n    }" { (expression_statement "iVar2 = (*aSyscall[1].pCurrent)(p->hShm);" (assignment_expression "iVar2 = (*aSyscall[1].pCurrent)(p->hShm)" identifier = (call_expression "(*aSyscall[1].pCurrent)(p->hShm)" (parenthesized_expression "(*aSyscall[1].pCurrent)" ( (pointer_expression "*aSyscall[1].pCurrent" * (field_expression "aSyscall[1].pCurrent" (subscript_expression "aSyscall[1]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(p->hShm)" ( (field_expression "p->hShm" identifier -> field_identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n        robust_close(pFd,0x8fb0,lineno);\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        robust_close(pFd,0x8fb0,lineno);\n      }" { (expression_statement "robust_close(pFd,0x8fb0,lineno);" (call_expression "robust_close(pFd,0x8fb0,lineno)" identifier (argument_list "(pFd,0x8fb0,lineno)" ( identifier , number_literal , identifier ))) ;) })) (expression_statement "p->hShm = -1;" (assignment_expression "p->hShm = -1" (field_expression "p->hShm" identifier -> field_identifier) = number_literal) ;) })) (expression_statement "p->pInode->pShmNode = (unixShmNode *)0x0;" (assignment_expression "p->pInode->pShmNode = (unixShmNode *)0x0" (field_expression "p->pInode->pShmNode" (field_expression "p->pInode" identifier -> field_identifier) -> field_identifier) = (cast_expression "(unixShmNode *)0x0" ( (type_descriptor "unixShmNode *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "sqlite3_free(p);" (call_expression "sqlite3_free(p)" identifier (argument_list "(p)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00071ce0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00071ce0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00071ce0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);" (assignment_expression "piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28)" identifier = (pointer_expression "*(int **)(*(int *)(param_1 + 8) + 0x28)" * (cast_expression "(int **)(*(int *)(param_1 + 8) + 0x28)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 8) + 0x28)" ( (binary_expression "*(int *)(param_1 + 8) + 0x28" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }" if (parenthesized_expression "((piVar1 != (int *)0x0) && (piVar1[7] == 0))" ( (binary_expression "(piVar1 != (int *)0x0) && (piVar1[7] == 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(piVar1[7] == 0)" ( (binary_expression "piVar1[7] == 0" (subscript_expression "piVar1[7]" identifier [ number_literal ]) == number_literal) ))) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }" { (expression_statement "iVar3 = (*(code *)PTR_FUN_0017d870)();" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0017d870)()" identifier = (call_expression "(*(code *)PTR_FUN_0017d870)()" (parenthesized_expression "(*(code *)PTR_FUN_0017d870)" ( (pointer_expression "*(code *)PTR_FUN_0017d870" * (cast_expression "(code *)PTR_FUN_0017d870" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "iVar4 = iVar3 >> 0xf;" (assignment_expression "iVar4 = iVar3 >> 0xf" identifier = (binary_expression "iVar3 >> 0xf" identifier >> number_literal)) ;) (if_statement "if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }" if (parenthesized_expression "(iVar3 < 0x8000)" ( (binary_expression "iVar3 < 0x8000" identifier < number_literal) )) (compound_statement "{\n      iVar4 = 1;\n    }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) })) (if_statement "if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }" if (parenthesized_expression "(piVar1[1] != 0)" ( (binary_expression "piVar1[1] != 0" (subscript_expression "piVar1[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      (*DAT_0017c438)(piVar1[1]);\n    }" { (expression_statement "(*DAT_0017c438)(piVar1[1]);" (call_expression "(*DAT_0017c438)(piVar1[1])" (parenthesized_expression "(*DAT_0017c438)" ( (pointer_expression "*DAT_0017c438" * identifier) )) (argument_list "(piVar1[1])" ( (subscript_expression "piVar1[1]" identifier [ number_literal ]) ))) ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }" if (parenthesized_expression "((short)piVar1[5] != 0)" ( (binary_expression "(short)piVar1[5] != 0" (cast_expression "(short)piVar1[5]" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (subscript_expression "piVar1[5]" identifier [ number_literal ])) != number_literal) )) (compound_statement "{\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }" { (do_statement "do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));" do (compound_statement "{\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      }" { (while_statement "while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }" while (parenthesized_expression "(uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3])" ( (comma_expression "uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]" (assignment_expression "uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4)" identifier = (pointer_expression "*(undefined4 *)(piVar1[6] + iVar3 * 4)" * (cast_expression "(undefined4 *)(piVar1[6] + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1[6] + iVar3 * 4)" ( (binary_expression "piVar1[6] + iVar3 * 4" (subscript_expression "piVar1[6]" identifier [ number_literal ]) + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))) , (binary_expression "-1 < piVar1[3]" number_literal < (subscript_expression "piVar1[3]" identifier [ number_literal ]))) )) (compound_statement "{\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }" { (expression_statement "iVar3 = iVar3 + iVar4;" (assignment_expression "iVar3 = iVar3 + iVar4" identifier = (binary_expression "iVar3 + iVar4" identifier + identifier)) ;) (expression_statement "(*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);" (call_expression "(*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4])" (parenthesized_expression "(*(code *)PTR_munmap_0017d858)" ( (pointer_expression "*(code *)PTR_munmap_0017d858" * (cast_expression "(code *)PTR_munmap_0017d858" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,piVar1[4])" ( identifier , (subscript_expression "piVar1[4]" identifier [ number_literal ]) ))) ;) (if_statement "if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;" if (parenthesized_expression "((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3)" ( (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5) <= iVar3" (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(piVar1 + 5)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 5)" ( (binary_expression "piVar1 + 5" identifier + number_literal) )))) <= identifier) )) (goto_statement "goto LAB_00071d85;" goto statement_identifier ;)) })) (expression_statement "iVar3 = iVar3 + iVar4;" (assignment_expression "iVar3 = iVar3 + iVar4" identifier = (binary_expression "iVar3 + iVar4" identifier + identifier)) ;) (expression_statement "FUN_00042800(uVar2);" (call_expression "FUN_00042800(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) }) while (parenthesized_expression "(iVar3 < (int)(uint)*(ushort *)(piVar1 + 5))" ( (binary_expression "iVar3 < (int)(uint)*(ushort *)(piVar1 + 5)" identifier < (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(piVar1 + 5)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 5)" ( (binary_expression "piVar1 + 5" identifier + number_literal) ))))) )) ;) })) (labeled_statement "LAB_00071d85:\n    FUN_00042800(piVar1[6]);" statement_identifier : (expression_statement "FUN_00042800(piVar1[6]);" (call_expression "FUN_00042800(piVar1[6])" identifier (argument_list "(piVar1[6])" ( (subscript_expression "piVar1[6]" identifier [ number_literal ]) ))) ;)) (if_statement "if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }" if (parenthesized_expression "(-1 < piVar1[3])" ( (binary_expression "-1 < piVar1[3]" number_literal < (subscript_expression "piVar1[3]" identifier [ number_literal ])) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }" { (expression_statement "iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);" (assignment_expression "iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3])" identifier = (call_expression "(*(code *)PTR_close_0017d750)(piVar1[3])" (parenthesized_expression "(*(code *)PTR_close_0017d750)" ( (pointer_expression "*(code *)PTR_close_0017d750" * (cast_expression "(code *)PTR_close_0017d750" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar1[3])" ( (subscript_expression "piVar1[3]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar3 != 0) {\n        FUN_00071ca0();\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_00071ca0();\n      }" { (expression_statement "FUN_00071ca0();" (call_expression "FUN_00071ca0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "piVar1[3] = -1;" (assignment_expression "piVar1[3] = -1" (subscript_expression "piVar1[3]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "*(undefined4 *)(*piVar1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(*piVar1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(*piVar1 + 0x28)" * (cast_expression "(undefined4 *)(*piVar1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar1 + 0x28)" ( (binary_expression "*piVar1 + 0x28" (pointer_expression "*piVar1" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_00042800(piVar1);" (call_expression "FUN_00042800(piVar1)" identifier (argument_list "(piVar1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (subscript_expression IDENT [ LIT ])) != LIT) )) (compound_statement { (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT)) ))))) , (binary_expression LIT < (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) ;) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (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 (pointer_expression * IDENT) + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00071ce0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00071ce0(int param_1)" (identifier "FUN_00071ce0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int *piVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);\n  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);" (assignment_expression "piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(*(int *)(param_1 + 8) + 0x28)" (* "*") (cast_expression "(int **)(*(int *)(param_1 + 8) + 0x28)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(param_1 + 8) + 0x28)" (( "(") (binary_expression "*(int *)(param_1 + 8) + 0x28" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }" (if "if") (parenthesized_expression "((piVar1 != (int *)0x0) && (piVar1[7] == 0))" (( "(") (binary_expression "(piVar1 != (int *)0x0) && (piVar1[7] == 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" (( "(") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(piVar1[7] == 0)" (( "(") (binary_expression "piVar1[7] == 0" (subscript_expression "piVar1[7]" (identifier "piVar1") ([ "[") (number_literal "7") (] "]")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    iVar3 = (*(code *)PTR_FUN_0017d870)();\n    iVar4 = iVar3 >> 0xf;\n    if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }\n    if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }\n    iVar3 = 0;\n    if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }\nLAB_00071d85:\n    FUN_00042800(piVar1[6]);\n    if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }\n    *(undefined4 *)(*piVar1 + 0x28) = 0;\n    FUN_00042800(piVar1);\n  }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_FUN_0017d870)();" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0017d870)()" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_FUN_0017d870)()" (parenthesized_expression "(*(code *)PTR_FUN_0017d870)" (( "(") (pointer_expression "*(code *)PTR_FUN_0017d870" (* "*") (cast_expression "(code *)PTR_FUN_0017d870" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0017d870"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar4 = iVar3 >> 0xf;" (assignment_expression "iVar4 = iVar3 >> 0xf" (identifier "iVar4") (= "=") (binary_expression "iVar3 >> 0xf" (identifier "iVar3") (>> ">>") (number_literal "0xf"))) (; ";")) (if_statement "if (iVar3 < 0x8000) {\n      iVar4 = 1;\n    }" (if "if") (parenthesized_expression "(iVar3 < 0x8000)" (( "(") (binary_expression "iVar3 < 0x8000" (identifier "iVar3") (< "<") (number_literal "0x8000")) () ")")) (compound_statement "{\n      iVar4 = 1;\n    }" ({ "{") (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";")) (} "}"))) (if_statement "if (piVar1[1] != 0) {\n      (*DAT_0017c438)(piVar1[1]);\n    }" (if "if") (parenthesized_expression "(piVar1[1] != 0)" (( "(") (binary_expression "piVar1[1] != 0" (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*DAT_0017c438)(piVar1[1]);\n    }" ({ "{") (expression_statement "(*DAT_0017c438)(piVar1[1]);" (call_expression "(*DAT_0017c438)(piVar1[1])" (parenthesized_expression "(*DAT_0017c438)" (( "(") (pointer_expression "*DAT_0017c438" (* "*") (identifier "DAT_0017c438")) () ")")) (argument_list "(piVar1[1])" (( "(") (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((short)piVar1[5] != 0) {\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }" (if "if") (parenthesized_expression "((short)piVar1[5] != 0)" (( "(") (binary_expression "(short)piVar1[5] != 0" (cast_expression "(short)piVar1[5]" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (subscript_expression "piVar1[5]" (identifier "piVar1") ([ "[") (number_literal "5") (] "]"))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));\n    }" ({ "{") (do_statement "do {\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));" (do "do") (compound_statement "{\n        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }\n        iVar3 = iVar3 + iVar4;\n        FUN_00042800(uVar2);\n      }" ({ "{") (while_statement "while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }" (while "while") (parenthesized_expression "(uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3])" (( "(") (comma_expression "uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]" (assignment_expression "uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4)" (identifier "uVar2") (= "=") (pointer_expression "*(undefined4 *)(piVar1[6] + iVar3 * 4)" (* "*") (cast_expression "(undefined4 *)(piVar1[6] + iVar3 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar1[6] + iVar3 * 4)" (( "(") (binary_expression "piVar1[6] + iVar3 * 4" (subscript_expression "piVar1[6]" (identifier "piVar1") ([ "[") (number_literal "6") (] "]")) (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) () ")"))))) (, ",") (binary_expression "-1 < piVar1[3]" (number_literal "-1") (< "<") (subscript_expression "piVar1[3]" (identifier "piVar1") ([ "[") (number_literal "3") (] "]")))) () ")")) (compound_statement "{\n          iVar3 = iVar3 + iVar4;\n          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);\n          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;\n        }" ({ "{") (expression_statement "iVar3 = iVar3 + iVar4;" (assignment_expression "iVar3 = iVar3 + iVar4" (identifier "iVar3") (= "=") (binary_expression "iVar3 + iVar4" (identifier "iVar3") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "(*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);" (call_expression "(*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4])" (parenthesized_expression "(*(code *)PTR_munmap_0017d858)" (( "(") (pointer_expression "*(code *)PTR_munmap_0017d858" (* "*") (cast_expression "(code *)PTR_munmap_0017d858" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_munmap_0017d858"))) () ")")) (argument_list "(uVar2,piVar1[4])" (( "(") (identifier "uVar2") (, ",") (subscript_expression "piVar1[4]" (identifier "piVar1") ([ "[") (number_literal "4") (] "]")) () ")"))) (; ";")) (if_statement "if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;" (if "if") (parenthesized_expression "((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3)" (( "(") (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5) <= iVar3" (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(ushort *)(piVar1 + 5)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar1 + 5)" (( "(") (binary_expression "piVar1 + 5" (identifier "piVar1") (+ "+") (number_literal "5")) () ")")))) (<= "<=") (identifier "iVar3")) () ")")) (goto_statement "goto LAB_00071d85;" (goto "goto") (statement_identifier "LAB_00071d85") (; ";"))) (} "}"))) (expression_statement "iVar3 = iVar3 + iVar4;" (assignment_expression "iVar3 = iVar3 + iVar4" (identifier "iVar3") (= "=") (binary_expression "iVar3 + iVar4" (identifier "iVar3") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "FUN_00042800(uVar2);" (call_expression "FUN_00042800(uVar2)" (identifier "FUN_00042800") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 < (int)(uint)*(ushort *)(piVar1 + 5))" (( "(") (binary_expression "iVar3 < (int)(uint)*(ushort *)(piVar1 + 5)" (identifier "iVar3") (< "<") (binary_expression "(int)(uint)*(ushort *)(piVar1 + 5)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(ushort *)(piVar1 + 5)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar1 + 5)" (( "(") (binary_expression "piVar1 + 5" (identifier "piVar1") (+ "+") (number_literal "5")) () ")"))))) () ")")) (; ";")) (} "}"))) (labeled_statement "LAB_00071d85:\n    FUN_00042800(piVar1[6]);" (statement_identifier "LAB_00071d85") (: ":") (expression_statement "FUN_00042800(piVar1[6]);" (call_expression "FUN_00042800(piVar1[6])" (identifier "FUN_00042800") (argument_list "(piVar1[6])" (( "(") (subscript_expression "piVar1[6]" (identifier "piVar1") ([ "[") (number_literal "6") (] "]")) () ")"))) (; ";"))) (if_statement "if (-1 < piVar1[3]) {\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }" (if "if") (parenthesized_expression "(-1 < piVar1[3])" (( "(") (binary_expression "-1 < piVar1[3]" (number_literal "-1") (< "<") (subscript_expression "piVar1[3]" (identifier "piVar1") ([ "[") (number_literal "3") (] "]"))) () ")")) (compound_statement "{\n      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);\n      if (iVar3 != 0) {\n        FUN_00071ca0();\n      }\n      piVar1[3] = -1;\n    }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);" (assignment_expression "iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3])" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_close_0017d750)(piVar1[3])" (parenthesized_expression "(*(code *)PTR_close_0017d750)" (( "(") (pointer_expression "*(code *)PTR_close_0017d750" (* "*") (cast_expression "(code *)PTR_close_0017d750" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0017d750"))) () ")")) (argument_list "(piVar1[3])" (( "(") (subscript_expression "piVar1[3]" (identifier "piVar1") ([ "[") (number_literal "3") (] "]")) () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n        FUN_00071ca0();\n      }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_00071ca0();\n      }" ({ "{") (expression_statement "FUN_00071ca0();" (call_expression "FUN_00071ca0()" (identifier "FUN_00071ca0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "piVar1[3] = -1;" (assignment_expression "piVar1[3] = -1" (subscript_expression "piVar1[3]" (identifier "piVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "-1")) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(*piVar1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(*piVar1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(*piVar1 + 0x28)" (* "*") (cast_expression "(undefined4 *)(*piVar1 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar1 + 0x28)" (( "(") (binary_expression "*piVar1 + 0x28" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "0x28")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_00042800(piVar1);" (call_expression "FUN_00042800(piVar1)" (identifier "FUN_00042800") (argument_list "(piVar1)" (( "(") (identifier "piVar1") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

void __regparm3 function_1(type_1 *pFd)

{
  char **ppcVar1;
  type_2 *var_1;
  int var_2;
  int lineno;
  int var_3;
  
  var_1 = pFd->pInode->pShmNode;
  if ((var_1 != (type_2 *)0x0) && (var_1->nRef == 0)) {
    var_2 = (*aSyscall[0x19].pCurrent)();
    var_3 = var_2 >> 0xf;
    if (var_2 < 0x8000) {
      var_3 = 1;
    }
    if (var_1->pShmMutex != (type_3 *)0x0) {
      (*sqlite3Config.mutex.xMutexFree)(var_1->pShmMutex);
    }
    var_2 = 0;
    if (var_1->nRegion != 0) {
      do {
        while (ppcVar1 = var_1->apRegion + var_2, -1 < var_1->hShm) {
          var_2 = var_2 + var_3;
          (*aSyscall[0x17].pCurrent)(*ppcVar1,var_1->szRegion);
          if ((int)(type_4)var_1->nRegion <= var_2) goto LAB_00071d85;
        }
        var_2 = var_2 + var_3;
        var_4(*ppcVar1);
      } while (var_2 < (int)(type_4)var_1->nRegion);
    }
LAB_00071d85:
    var_4(var_1->apRegion);
    if (-1 < var_1->hShm) {
      var_2 = (*aSyscall[1].pCurrent)(var_1->hShm);
      if (var_2 != 0) {
        var_5(pFd,0x8fb0,lineno);
      }
      var_1->hShm = -1;
    }
    var_1->pInode->pShmNode = (type_2 *)0x0;
    var_4(var_1);
  }
  return;
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

void __regparm3 MASKED(int param_1)

{
  int *piVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  piVar1 = *(int **)(*(int *)(param_1 + 8) + 0x28);
  if ((piVar1 != (int *)0x0) && (piVar1[7] == 0)) {
    iVar3 = (*(code *)PTR_FUN_0017d870)();
    iVar4 = iVar3 >> 0xf;
    if (iVar3 < 0x8000) {
      iVar4 = 1;
    }
    if (piVar1[1] != 0) {
      (*DAT_0017c438)(piVar1[1]);
    }
    iVar3 = 0;
    if ((short)piVar1[5] != 0) {
      do {
        while (uVar2 = *(undefined4 *)(piVar1[6] + iVar3 * 4), -1 < piVar1[3]) {
          iVar3 = iVar3 + iVar4;
          (*(code *)PTR_munmap_0017d858)(uVar2,piVar1[4]);
          if ((int)(uint)*(ushort *)(piVar1 + 5) <= iVar3) goto LAB_00071d85;
        }
        iVar3 = iVar3 + iVar4;
        FUN_00042800(uVar2);
      } while (iVar3 < (int)(uint)*(ushort *)(piVar1 + 5));
    }
LAB_00071d85:
    FUN_00042800(piVar1[6]);
    if (-1 < piVar1[3]) {
      iVar3 = (*(code *)PTR_close_0017d750)(piVar1[3]);
      if (iVar3 != 0) {
        FUN_00071ca0();
      }
      piVar1[3] = -1;
    }
    *(undefined4 *)(*piVar1 + 0x28) = 0;
    FUN_00042800(piVar1);
  }
  return;
}

