
/* WARNING: Unknown calling convention */

void sqlite3PcacheMakeDirty(PgHdr *p)

{
  PCache *pPVar1;
  PgHdr *pPVar2;
  ushort uVar3;
  PCache *p_1;
  
  uVar3 = p->flags;
  if ((uVar3 & 0x11) == 0) {
    return;
  }
  if ((uVar3 & 1) == 0) {
    p->flags = uVar3 & 0xffef;
    return;
  }
  pPVar1 = p->pCache;
  uVar3 = uVar3 & 0xffef ^ 3;
  p->flags = uVar3;
  p->pDirtyPrev = (PgHdr *)0x0;
  pPVar2 = pPVar1->pDirty;
  p->pDirtyNext = pPVar2;
  if (pPVar2 == (PgHdr *)0x0) {
    pPVar1->pDirtyTail = p;
    if (pPVar1->bPurgeable != '\0') {
      pPVar1->eCreate = '\x01';
    }
  }
  else {
    pPVar2->pDirtyPrev = p;
  }
  pPVar1->pDirty = p;
  if ((pPVar1->pSynced == (PgHdr *)0x0) && ((uVar3 & 8) == 0)) {
    pPVar1->pSynced = p;
    return;
  }
  return;
}



void __regparm3 FUN_0004e810(int param_1)

{
  int *piVar1;
  int iVar2;
  ushort uVar3;
  
  uVar3 = *(ushort *)(param_1 + 0x1c);
  if ((uVar3 & 0x11) == 0) {
    return;
  }
  if ((uVar3 & 1) == 0) {
    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;
    return;
  }
  piVar1 = *(int **)(param_1 + 0xc);
  uVar3 = uVar3 & 0xffef ^ 3;
  *(ushort *)(param_1 + 0x1c) = uVar3;
  *(undefined4 *)(param_1 + 0x24) = 0;
  iVar2 = *piVar1;
  *(int *)(param_1 + 0x20) = iVar2;
  if (iVar2 == 0) {
    piVar1[1] = param_1;
    if ((char)piVar1[8] != '\0') {
      *(undefined1 *)((int)piVar1 + 0x21) = 1;
    }
  }
  else {
    *(int *)(iVar2 + 0x24) = param_1;
  }
  *piVar1 = param_1;
  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {
    piVar1[2] = param_1;
    return;
  }
  return;
}


MOVZX EDX,word ptr [EAX + 0x1c]
TEST DL,0x11
JZ 0x0004e830
MOV ECX,EDX
AND ECX,0xffffffef
AND EDX,0x1
JNZ 0x0004e838
MOV word ptr [EAX + 0x1c],CX
RET
RET
MOV EDX,dword ptr [EAX + 0xc]
PUSH EBX
XOR ECX,0x3
MOV word ptr [EAX + 0x1c],CX
MOV dword ptr [EAX + 0x24],0x0
MOV EBX,dword ptr [EDX]
TEST EBX,EBX
MOV dword ptr [EAX + 0x20],EBX
JZ 0x0004e878
MOV dword ptr [EBX + 0x24],EAX
MOV EBX,dword ptr [EDX + 0x8]
MOV dword ptr [EDX],EAX
TEST EBX,EBX
JZ 0x0004e868
POP EBX
RET
AND ECX,0x8
JNZ 0x0004e85f
MOV dword ptr [EDX + 0x8],EAX
POP EBX
RET
CMP byte ptr [EDX + 0x20],0x0
MOV dword ptr [EDX + 0x4],EAX
JZ 0x0004e856
MOV byte ptr [EDX + 0x21],0x1
JMP 0x0004e856
(translation_unit "void __regparm3 FUN_0004e810(int param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0004e810(int param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0004e810(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = *(ushort *)(param_1 + 0x1c);" (assignment_expression "uVar3 = *(ushort *)(param_1 + 0x1c)" identifier = (pointer_expression "*(ushort *)(param_1 + 0x1c)" * (cast_expression "(ushort *)(param_1 + 0x1c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if ((uVar3 & 0x11) == 0) {\n    return;\n  }" if (parenthesized_expression "((uVar3 & 0x11) == 0)" ( (binary_expression "(uVar3 & 0x11) == 0" (parenthesized_expression "(uVar3 & 0x11)" ( (binary_expression "uVar3 & 0x11" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }" if (parenthesized_expression "((uVar3 & 1) == 0)" ( (binary_expression "(uVar3 & 1) == 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }" { (expression_statement "*(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;" (assignment_expression "*(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef" (pointer_expression "*(ushort *)(param_1 + 0x1c)" * (cast_expression "(ushort *)(param_1 + 0x1c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = (binary_expression "uVar3 & 0xffef" identifier & number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "piVar1 = *(int **)(param_1 + 0xc);" (assignment_expression "piVar1 = *(int **)(param_1 + 0xc)" identifier = (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = uVar3 & 0xffef ^ 3;" (assignment_expression "uVar3 = uVar3 & 0xffef ^ 3" identifier = (binary_expression "uVar3 & 0xffef ^ 3" (binary_expression "uVar3 & 0xffef" identifier & number_literal) ^ number_literal)) ;) (expression_statement "*(ushort *)(param_1 + 0x1c) = uVar3;" (assignment_expression "*(ushort *)(param_1 + 0x1c) = uVar3" (pointer_expression "*(ushort *)(param_1 + 0x1c)" * (cast_expression "(ushort *)(param_1 + 0x1c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*(int *)(param_1 + 0x20) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x20) = iVar2" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }" { (expression_statement "piVar1[1] = param_1;" (assignment_expression "piVar1[1] = param_1" (subscript_expression "piVar1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }" if (parenthesized_expression "((char)piVar1[8] != '\0')" ( (binary_expression "(char)piVar1[8] != '\0'" (cast_expression "(char)piVar1[8]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar1[8]" identifier [ number_literal ])) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }" { (expression_statement "*(undefined1 *)((int)piVar1 + 0x21) = 1;" (assignment_expression "*(undefined1 *)((int)piVar1 + 0x21) = 1" (pointer_expression "*(undefined1 *)((int)piVar1 + 0x21)" * (cast_expression "(undefined1 *)((int)piVar1 + 0x21)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar1 + 0x21)" ( (binary_expression "(int)piVar1 + 0x21" (cast_expression "(int)piVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) })) }) (else_clause "else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" else (compound_statement "{\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" { (expression_statement "*(int *)(iVar2 + 0x24) = param_1;" (assignment_expression "*(int *)(iVar2 + 0x24) = param_1" (pointer_expression "*(int *)(iVar2 + 0x24)" * (cast_expression "(int *)(iVar2 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x24)" ( (binary_expression "iVar2 + 0x24" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "*piVar1 = param_1;" (assignment_expression "*piVar1 = param_1" (pointer_expression "*piVar1" * identifier) = identifier) ;) (if_statement "if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }" if (parenthesized_expression "((piVar1[2] == 0) && ((uVar3 & 8) == 0))" ( (binary_expression "(piVar1[2] == 0) && ((uVar3 & 8) == 0)" (parenthesized_expression "(piVar1[2] == 0)" ( (binary_expression "piVar1[2] == 0" (subscript_expression "piVar1[2]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "((uVar3 & 8) == 0)" ( (binary_expression "(uVar3 & 8) == 0" (parenthesized_expression "(uVar3 & 8)" ( (binary_expression "uVar3 & 8" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    piVar1[2] = param_1;\n    return;\n  }" { (expression_statement "piVar1[2] = param_1;" (assignment_expression "piVar1[2] = param_1" (subscript_expression "piVar1[2]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid sqlite3PcacheMakeDirty(PgHdr *p)\n\n{\n  PCache *pPVar1;\n  PgHdr *pPVar2;\n  ushort uVar3;\n  PCache *p_1;\n  \n  uVar3 = p->flags;\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    p->flags = uVar3 & 0xffef;\n    return;\n  }\n  pPVar1 = p->pCache;\n  uVar3 = uVar3 & 0xffef ^ 3;\n  p->flags = uVar3;\n  p->pDirtyPrev = (PgHdr *)0x0;\n  pPVar2 = pPVar1->pDirty;\n  p->pDirtyNext = pPVar2;\n  if (pPVar2 == (PgHdr *)0x0) {\n    pPVar1->pDirtyTail = p;\n    if (pPVar1->bPurgeable != '\0') {\n      pPVar1->eCreate = '\x01';\n    }\n  }\n  else {\n    pPVar2->pDirtyPrev = p;\n  }\n  pPVar1->pDirty = p;\n  if ((pPVar1->pSynced == (PgHdr *)0x0) && ((uVar3 & 8) == 0)) {\n    pPVar1->pSynced = p;\n    return;\n  }\n  return;\n}\n\n" comment (function_definition "void sqlite3PcacheMakeDirty(PgHdr *p)\n\n{\n  PCache *pPVar1;\n  PgHdr *pPVar2;\n  ushort uVar3;\n  PCache *p_1;\n  \n  uVar3 = p->flags;\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    p->flags = uVar3 & 0xffef;\n    return;\n  }\n  pPVar1 = p->pCache;\n  uVar3 = uVar3 & 0xffef ^ 3;\n  p->flags = uVar3;\n  p->pDirtyPrev = (PgHdr *)0x0;\n  pPVar2 = pPVar1->pDirty;\n  p->pDirtyNext = pPVar2;\n  if (pPVar2 == (PgHdr *)0x0) {\n    pPVar1->pDirtyTail = p;\n    if (pPVar1->bPurgeable != '\0') {\n      pPVar1->eCreate = '\x01';\n    }\n  }\n  else {\n    pPVar2->pDirtyPrev = p;\n  }\n  pPVar1->pDirty = p;\n  if ((pPVar1->pSynced == (PgHdr *)0x0) && ((uVar3 & 8) == 0)) {\n    pPVar1->pSynced = p;\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "sqlite3PcacheMakeDirty(PgHdr *p)" identifier (parameter_list "(PgHdr *p)" ( (parameter_declaration "PgHdr *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  PCache *pPVar1;\n  PgHdr *pPVar2;\n  ushort uVar3;\n  PCache *p_1;\n  \n  uVar3 = p->flags;\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    p->flags = uVar3 & 0xffef;\n    return;\n  }\n  pPVar1 = p->pCache;\n  uVar3 = uVar3 & 0xffef ^ 3;\n  p->flags = uVar3;\n  p->pDirtyPrev = (PgHdr *)0x0;\n  pPVar2 = pPVar1->pDirty;\n  p->pDirtyNext = pPVar2;\n  if (pPVar2 == (PgHdr *)0x0) {\n    pPVar1->pDirtyTail = p;\n    if (pPVar1->bPurgeable != '\0') {\n      pPVar1->eCreate = '\x01';\n    }\n  }\n  else {\n    pPVar2->pDirtyPrev = p;\n  }\n  pPVar1->pDirty = p;\n  if ((pPVar1->pSynced == (PgHdr *)0x0) && ((uVar3 & 8) == 0)) {\n    pPVar1->pSynced = p;\n    return;\n  }\n  return;\n}" { (declaration "PCache *pPVar1;" type_identifier (pointer_declarator "*pPVar1" * identifier) ;) (declaration "PgHdr *pPVar2;" type_identifier (pointer_declarator "*pPVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "PCache *p_1;" type_identifier (pointer_declarator "*p_1" * identifier) ;) (expression_statement "uVar3 = p->flags;" (assignment_expression "uVar3 = p->flags" identifier = (field_expression "p->flags" identifier -> field_identifier)) ;) (if_statement "if ((uVar3 & 0x11) == 0) {\n    return;\n  }" if (parenthesized_expression "((uVar3 & 0x11) == 0)" ( (binary_expression "(uVar3 & 0x11) == 0" (parenthesized_expression "(uVar3 & 0x11)" ( (binary_expression "uVar3 & 0x11" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if ((uVar3 & 1) == 0) {\n    p->flags = uVar3 & 0xffef;\n    return;\n  }" if (parenthesized_expression "((uVar3 & 1) == 0)" ( (binary_expression "(uVar3 & 1) == 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    p->flags = uVar3 & 0xffef;\n    return;\n  }" { (expression_statement "p->flags = uVar3 & 0xffef;" (assignment_expression "p->flags = uVar3 & 0xffef" (field_expression "p->flags" identifier -> field_identifier) = (binary_expression "uVar3 & 0xffef" identifier & number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "pPVar1 = p->pCache;" (assignment_expression "pPVar1 = p->pCache" identifier = (field_expression "p->pCache" identifier -> field_identifier)) ;) (expression_statement "uVar3 = uVar3 & 0xffef ^ 3;" (assignment_expression "uVar3 = uVar3 & 0xffef ^ 3" identifier = (binary_expression "uVar3 & 0xffef ^ 3" (binary_expression "uVar3 & 0xffef" identifier & number_literal) ^ number_literal)) ;) (expression_statement "p->flags = uVar3;" (assignment_expression "p->flags = uVar3" (field_expression "p->flags" identifier -> field_identifier) = identifier) ;) (expression_statement "p->pDirtyPrev = (PgHdr *)0x0;" (assignment_expression "p->pDirtyPrev = (PgHdr *)0x0" (field_expression "p->pDirtyPrev" identifier -> field_identifier) = (cast_expression "(PgHdr *)0x0" ( (type_descriptor "PgHdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pPVar2 = pPVar1->pDirty;" (assignment_expression "pPVar2 = pPVar1->pDirty" identifier = (field_expression "pPVar1->pDirty" identifier -> field_identifier)) ;) (expression_statement "p->pDirtyNext = pPVar2;" (assignment_expression "p->pDirtyNext = pPVar2" (field_expression "p->pDirtyNext" identifier -> field_identifier) = identifier) ;) (if_statement "if (pPVar2 == (PgHdr *)0x0) {\n    pPVar1->pDirtyTail = p;\n    if (pPVar1->bPurgeable != '\0') {\n      pPVar1->eCreate = '\x01';\n    }\n  }\n  else {\n    pPVar2->pDirtyPrev = p;\n  }" if (parenthesized_expression "(pPVar2 == (PgHdr *)0x0)" ( (binary_expression "pPVar2 == (PgHdr *)0x0" identifier == (cast_expression "(PgHdr *)0x0" ( (type_descriptor "PgHdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pPVar1->pDirtyTail = p;\n    if (pPVar1->bPurgeable != '\0') {\n      pPVar1->eCreate = '\x01';\n    }\n  }" { (expression_statement "pPVar1->pDirtyTail = p;" (assignment_expression "pPVar1->pDirtyTail = p" (field_expression "pPVar1->pDirtyTail" identifier -> field_identifier) = identifier) ;) (if_statement "if (pPVar1->bPurgeable != '\0') {\n      pPVar1->eCreate = '\x01';\n    }" if (parenthesized_expression "(pPVar1->bPurgeable != '\0')" ( (binary_expression "pPVar1->bPurgeable != '\0'" (field_expression "pPVar1->bPurgeable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pPVar1->eCreate = '\x01';\n    }" { (expression_statement "pPVar1->eCreate = '\x01';" (assignment_expression "pPVar1->eCreate = '\x01'" (field_expression "pPVar1->eCreate" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) })) }) (else_clause "else {\n    pPVar2->pDirtyPrev = p;\n  }" else (compound_statement "{\n    pPVar2->pDirtyPrev = p;\n  }" { (expression_statement "pPVar2->pDirtyPrev = p;" (assignment_expression "pPVar2->pDirtyPrev = p" (field_expression "pPVar2->pDirtyPrev" identifier -> field_identifier) = identifier) ;) }))) (expression_statement "pPVar1->pDirty = p;" (assignment_expression "pPVar1->pDirty = p" (field_expression "pPVar1->pDirty" identifier -> field_identifier) = identifier) ;) (if_statement "if ((pPVar1->pSynced == (PgHdr *)0x0) && ((uVar3 & 8) == 0)) {\n    pPVar1->pSynced = p;\n    return;\n  }" if (parenthesized_expression "((pPVar1->pSynced == (PgHdr *)0x0) && ((uVar3 & 8) == 0))" ( (binary_expression "(pPVar1->pSynced == (PgHdr *)0x0) && ((uVar3 & 8) == 0)" (parenthesized_expression "(pPVar1->pSynced == (PgHdr *)0x0)" ( (binary_expression "pPVar1->pSynced == (PgHdr *)0x0" (field_expression "pPVar1->pSynced" identifier -> field_identifier) == (cast_expression "(PgHdr *)0x0" ( (type_descriptor "PgHdr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "((uVar3 & 8) == 0)" ( (binary_expression "(uVar3 & 8) == 0" (parenthesized_expression "(uVar3 & 8)" ( (binary_expression "uVar3 & 8" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    pPVar1->pSynced = p;\n    return;\n  }" { (expression_statement "pPVar1->pSynced = p;" (assignment_expression "pPVar1->pSynced = p" (field_expression "pPVar1->pSynced" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0004e810(int param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0004e810(int param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0004e810(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = *(ushort *)(param_1 + 0x1c);" (assignment_expression "uVar3 = *(ushort *)(param_1 + 0x1c)" identifier = (pointer_expression "*(ushort *)(param_1 + 0x1c)" * (cast_expression "(ushort *)(param_1 + 0x1c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if ((uVar3 & 0x11) == 0) {\n    return;\n  }" if (parenthesized_expression "((uVar3 & 0x11) == 0)" ( (binary_expression "(uVar3 & 0x11) == 0" (parenthesized_expression "(uVar3 & 0x11)" ( (binary_expression "uVar3 & 0x11" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }" if (parenthesized_expression "((uVar3 & 1) == 0)" ( (binary_expression "(uVar3 & 1) == 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }" { (expression_statement "*(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;" (assignment_expression "*(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef" (pointer_expression "*(ushort *)(param_1 + 0x1c)" * (cast_expression "(ushort *)(param_1 + 0x1c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = (binary_expression "uVar3 & 0xffef" identifier & number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "piVar1 = *(int **)(param_1 + 0xc);" (assignment_expression "piVar1 = *(int **)(param_1 + 0xc)" identifier = (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = uVar3 & 0xffef ^ 3;" (assignment_expression "uVar3 = uVar3 & 0xffef ^ 3" identifier = (binary_expression "uVar3 & 0xffef ^ 3" (binary_expression "uVar3 & 0xffef" identifier & number_literal) ^ number_literal)) ;) (expression_statement "*(ushort *)(param_1 + 0x1c) = uVar3;" (assignment_expression "*(ushort *)(param_1 + 0x1c) = uVar3" (pointer_expression "*(ushort *)(param_1 + 0x1c)" * (cast_expression "(ushort *)(param_1 + 0x1c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*(int *)(param_1 + 0x20) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x20) = iVar2" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }" { (expression_statement "piVar1[1] = param_1;" (assignment_expression "piVar1[1] = param_1" (subscript_expression "piVar1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }" if (parenthesized_expression "((char)piVar1[8] != '\0')" ( (binary_expression "(char)piVar1[8] != '\0'" (cast_expression "(char)piVar1[8]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar1[8]" identifier [ number_literal ])) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }" { (expression_statement "*(undefined1 *)((int)piVar1 + 0x21) = 1;" (assignment_expression "*(undefined1 *)((int)piVar1 + 0x21) = 1" (pointer_expression "*(undefined1 *)((int)piVar1 + 0x21)" * (cast_expression "(undefined1 *)((int)piVar1 + 0x21)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar1 + 0x21)" ( (binary_expression "(int)piVar1 + 0x21" (cast_expression "(int)piVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) })) }) (else_clause "else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" else (compound_statement "{\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" { (expression_statement "*(int *)(iVar2 + 0x24) = param_1;" (assignment_expression "*(int *)(iVar2 + 0x24) = param_1" (pointer_expression "*(int *)(iVar2 + 0x24)" * (cast_expression "(int *)(iVar2 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x24)" ( (binary_expression "iVar2 + 0x24" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "*piVar1 = param_1;" (assignment_expression "*piVar1 = param_1" (pointer_expression "*piVar1" * identifier) = identifier) ;) (if_statement "if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }" if (parenthesized_expression "((piVar1[2] == 0) && ((uVar3 & 8) == 0))" ( (binary_expression "(piVar1[2] == 0) && ((uVar3 & 8) == 0)" (parenthesized_expression "(piVar1[2] == 0)" ( (binary_expression "piVar1[2] == 0" (subscript_expression "piVar1[2]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "((uVar3 & 8) == 0)" ( (binary_expression "(uVar3 & 8) == 0" (parenthesized_expression "(uVar3 & 8)" ( (binary_expression "uVar3 & 8" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    piVar1[2] = param_1;\n    return;\n  }" { (expression_statement "piVar1[2] = param_1;" (assignment_expression "piVar1[2] = param_1" (subscript_expression "piVar1[2]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (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 ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT & LIT)) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_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) )))) = IDENT) ;) (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 = (pointer_expression * 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 (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = 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) )))) = IDENT) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0004e810(int param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0004e810(int param_1)" (identifier "FUN_0004e810") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  ushort uVar3;\n  \n  uVar3 = *(ushort *)(param_1 + 0x1c);\n  if ((uVar3 & 0x11) == 0) {\n    return;\n  }\n  if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }\n  piVar1 = *(int **)(param_1 + 0xc);\n  uVar3 = uVar3 & 0xffef ^ 3;\n  *(ushort *)(param_1 + 0x1c) = uVar3;\n  *(undefined4 *)(param_1 + 0x24) = 0;\n  iVar2 = *piVar1;\n  *(int *)(param_1 + 0x20) = iVar2;\n  if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }\n  *piVar1 = param_1;\n  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "ushort uVar3;" (type_identifier "ushort") (identifier "uVar3") (; ";")) (expression_statement "uVar3 = *(ushort *)(param_1 + 0x1c);" (assignment_expression "uVar3 = *(ushort *)(param_1 + 0x1c)" (identifier "uVar3") (= "=") (pointer_expression "*(ushort *)(param_1 + 0x1c)" (* "*") (cast_expression "(ushort *)(param_1 + 0x1c)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (if_statement "if ((uVar3 & 0x11) == 0) {\n    return;\n  }" (if "if") (parenthesized_expression "((uVar3 & 0x11) == 0)" (( "(") (binary_expression "(uVar3 & 0x11) == 0" (parenthesized_expression "(uVar3 & 0x11)" (( "(") (binary_expression "uVar3 & 0x11" (identifier "uVar3") (& "&") (number_literal "0x11")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if ((uVar3 & 1) == 0) {\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }" (if "if") (parenthesized_expression "((uVar3 & 1) == 0)" (( "(") (binary_expression "(uVar3 & 1) == 0" (parenthesized_expression "(uVar3 & 1)" (( "(") (binary_expression "uVar3 & 1" (identifier "uVar3") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;\n    return;\n  }" ({ "{") (expression_statement "*(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;" (assignment_expression "*(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef" (pointer_expression "*(ushort *)(param_1 + 0x1c)" (* "*") (cast_expression "(ushort *)(param_1 + 0x1c)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (binary_expression "uVar3 & 0xffef" (identifier "uVar3") (& "&") (number_literal "0xffef"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "piVar1 = *(int **)(param_1 + 0xc);" (assignment_expression "piVar1 = *(int **)(param_1 + 0xc)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "uVar3 = uVar3 & 0xffef ^ 3;" (assignment_expression "uVar3 = uVar3 & 0xffef ^ 3" (identifier "uVar3") (= "=") (binary_expression "uVar3 & 0xffef ^ 3" (binary_expression "uVar3 & 0xffef" (identifier "uVar3") (& "&") (number_literal "0xffef")) (^ "^") (number_literal "3"))) (; ";")) (expression_statement "*(ushort *)(param_1 + 0x1c) = uVar3;" (assignment_expression "*(ushort *)(param_1 + 0x1c) = uVar3" (pointer_expression "*(ushort *)(param_1 + 0x1c)" (* "*") (cast_expression "(ushort *)(param_1 + 0x1c)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" (identifier "iVar2") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x20) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x20) = iVar2" (pointer_expression "*(int *)(param_1 + 0x20)" (* "*") (cast_expression "(int *)(param_1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (iVar2 == 0) {\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }\n  else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar1[1] = param_1;\n    if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }\n  }" ({ "{") (expression_statement "piVar1[1] = param_1;" (assignment_expression "piVar1[1] = param_1" (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_1")) (; ";")) (if_statement "if ((char)piVar1[8] != '\0') {\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }" (if "if") (parenthesized_expression "((char)piVar1[8] != '\0')" (( "(") (binary_expression "(char)piVar1[8] != '\0'" (cast_expression "(char)piVar1[8]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "piVar1[8]" (identifier "piVar1") ([ "[") (number_literal "8") (] "]"))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      *(undefined1 *)((int)piVar1 + 0x21) = 1;\n    }" ({ "{") (expression_statement "*(undefined1 *)((int)piVar1 + 0x21) = 1;" (assignment_expression "*(undefined1 *)((int)piVar1 + 0x21) = 1" (pointer_expression "*(undefined1 *)((int)piVar1 + 0x21)" (* "*") (cast_expression "(undefined1 *)((int)piVar1 + 0x21)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar1 + 0x21)" (( "(") (binary_expression "(int)piVar1 + 0x21" (cast_expression "(int)piVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar1")) (+ "+") (number_literal "0x21")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" (else "else") (compound_statement "{\n    *(int *)(iVar2 + 0x24) = param_1;\n  }" ({ "{") (expression_statement "*(int *)(iVar2 + 0x24) = param_1;" (assignment_expression "*(int *)(iVar2 + 0x24) = param_1" (pointer_expression "*(int *)(iVar2 + 0x24)" (* "*") (cast_expression "(int *)(iVar2 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x24)" (( "(") (binary_expression "iVar2 + 0x24" (identifier "iVar2") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (} "}")))) (expression_statement "*piVar1 = param_1;" (assignment_expression "*piVar1 = param_1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (identifier "param_1")) (; ";")) (if_statement "if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {\n    piVar1[2] = param_1;\n    return;\n  }" (if "if") (parenthesized_expression "((piVar1[2] == 0) && ((uVar3 & 8) == 0))" (( "(") (binary_expression "(piVar1[2] == 0) && ((uVar3 & 8) == 0)" (parenthesized_expression "(piVar1[2] == 0)" (( "(") (binary_expression "piVar1[2] == 0" (subscript_expression "piVar1[2]" (identifier "piVar1") ([ "[") (number_literal "2") (] "]")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((uVar3 & 8) == 0)" (( "(") (binary_expression "(uVar3 & 8) == 0" (parenthesized_expression "(uVar3 & 8)" (( "(") (binary_expression "uVar3 & 8" (identifier "uVar3") (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    piVar1[2] = param_1;\n    return;\n  }" ({ "{") (expression_statement "piVar1[2] = param_1;" (assignment_expression "piVar1[2] = param_1" (subscript_expression "piVar1[2]" (identifier "piVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(type_1 *p)

{
  type_2 *pPVar1;
  type_1 *var_2;
  type_3 var_1;
  type_2 *p_1;
  
  var_1 = p->flags;
  if ((var_1 & 0x11) == 0) {
    return;
  }
  if ((var_1 & 1) == 0) {
    p->flags = var_1 & 0xffef;
    return;
  }
  pPVar1 = p->pCache;
  var_1 = var_1 & 0xffef ^ 3;
  p->flags = var_1;
  p->pDirtyPrev = (type_1 *)0x0;
  var_2 = pPVar1->pDirty;
  p->pDirtyNext = var_2;
  if (var_2 == (type_1 *)0x0) {
    pPVar1->pDirtyTail = p;
    if (pPVar1->bPurgeable != '\0') {
      pPVar1->eCreate = '\x01';
    }
  }
  else {
    var_2->pDirtyPrev = p;
  }
  pPVar1->pDirty = p;
  if ((pPVar1->pSynced == (type_1 *)0x0) && ((var_1 & 8) == 0)) {
    pPVar1->pSynced = p;
    return;
  }
  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: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (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: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (return_statement))) (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: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (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: (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: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (return_statement))) (return_statement))))

void __regparm3 MASKED(int param_1)

{
  int *piVar1;
  int iVar2;
  ushort uVar3;
  
  uVar3 = *(ushort *)(param_1 + 0x1c);
  if ((uVar3 & 0x11) == 0) {
    return;
  }
  if ((uVar3 & 1) == 0) {
    *(ushort *)(param_1 + 0x1c) = uVar3 & 0xffef;
    return;
  }
  piVar1 = *(int **)(param_1 + 0xc);
  uVar3 = uVar3 & 0xffef ^ 3;
  *(ushort *)(param_1 + 0x1c) = uVar3;
  *(undefined4 *)(param_1 + 0x24) = 0;
  iVar2 = *piVar1;
  *(int *)(param_1 + 0x20) = iVar2;
  if (iVar2 == 0) {
    piVar1[1] = param_1;
    if ((char)piVar1[8] != '\0') {
      *(undefined1 *)((int)piVar1 + 0x21) = 1;
    }
  }
  else {
    *(int *)(iVar2 + 0x24) = param_1;
  }
  *piVar1 = param_1;
  if ((piVar1[2] == 0) && ((uVar3 & 8) == 0)) {
    piVar1[2] = param_1;
    return;
  }
  return;
}

