
int __regparm3 sqlite3BtreeSetVersion(Btree *pBtree,int iVersion)

{
  BtShared *pBVar1;
  u8 *puVar2;
  ushort uVar3;
  int iVar4;
  u8 uVar5;
  
  pBVar1 = pBtree->pBt;
  uVar3 = pBVar1->btsFlags & 0xffdf;
  if (iVersion == 1) {
    uVar3 = uVar3 | 0x20;
  }
  pBVar1->btsFlags = uVar3;
  iVar4 = sqlite3BtreeBeginTrans(pBtree,0,(int *)0x0);
  if (iVar4 == 0) {
    puVar2 = pBVar1->pPage1->aData;
    uVar5 = (u8)iVersion;
    if ((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])) {
      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);
      if (iVar4 == 0) {
        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);
        if (iVar4 == 0) {
          puVar2[0x12] = uVar5;
          puVar2[0x13] = uVar5;
        }
      }
    }
  }
  pBVar1->btsFlags = pBVar1->btsFlags & 0xffdf;
  return iVar4;
}



void __regparm3 FUN_00081680(int param_1,int param_2)

{
  int iVar1;
  ushort uVar2;
  int iVar3;
  int iVar4;
  char cVar5;
  
  iVar1 = *(int *)(param_1 + 4);
  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;
  if (param_2 == 1) {
    uVar2 = uVar2 | 0x20;
  }
  *(ushort *)(iVar1 + 0x18) = uVar2;
  iVar3 = FUN_00080d90();
  if (iVar3 == 0) {
    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);
    cVar5 = (char)param_2;
    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {
      iVar4 = FUN_00080d90();
      if (iVar4 == 0) {
        iVar4 = FUN_00076180();
        if (iVar4 == 0) {
          *(char *)(iVar3 + 0x12) = cVar5;
          *(char *)(iVar3 + 0x13) = cVar5;
        }
      }
    }
  }
  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;
  return;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
MOV ESI,EAX
SUB ESP,0xc
MOV EBX,dword ptr [EAX + 0x4]
MOVZX EAX,word ptr [EBX + 0x18]
AND EAX,0xffffffdf
MOV EDX,EAX
OR EDX,0x20
CMP EDI,0x1
CMOVZ EAX,EDX
XOR ECX,ECX
XOR EDX,EDX
MOV word ptr [EBX + 0x18],AX
MOV EAX,ESI
CALL 0x00080d90
TEST EAX,EAX
JNZ 0x000816d7
MOV EDX,dword ptr [EBX + 0xc]
MOV ECX,EDI
MOV EBP,dword ptr [EDX + 0x38]
CMP byte ptr [EBP + 0x12],CL
JNZ 0x000816c5
CMP CL,byte ptr [EBP + 0x13]
JZ 0x000816d7
XOR ECX,ECX
MOV EDX,0x2
MOV EAX,ESI
CALL 0x00080d90
TEST EAX,EAX
JZ 0x000816e8
AND word ptr [EBX + 0x18],0xffdf
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EBX + 0xc]
MOV EAX,dword ptr [EAX + 0x48]
CALL 0x00076180
TEST EAX,EAX
JNZ 0x000816d7
MOV ECX,EDI
MOV byte ptr [EBP + 0x12],CL
MOV byte ptr [EBP + 0x13],CL
JMP 0x000816d7
(translation_unit "void __regparm3 FUN_00081680(int param_1,int param_2)\n\n{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00081680(int param_1,int param_2)\n\n{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00081680(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char cVar5;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 4);" (assignment_expression "iVar1 = *(int *)(param_1 + 4)" identifier = (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;" (assignment_expression "uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf" identifier = (binary_expression "*(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) & number_literal)) ;) (if_statement "if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar2 = uVar2 | 0x20;\n  }" { (expression_statement "uVar2 = uVar2 | 0x20;" (assignment_expression "uVar2 = uVar2 | 0x20" identifier = (binary_expression "uVar2 | 0x20" identifier | number_literal)) ;) })) (expression_statement "*(ushort *)(iVar1 + 0x18) = uVar2;" (assignment_expression "*(ushort *)(iVar1 + 0x18) = uVar2" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar3 = FUN_00080d90();" (assignment_expression "iVar3 = FUN_00080d90()" identifier = (call_expression "FUN_00080d90()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }" { (expression_statement "iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);" (assignment_expression "iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38)" identifier = (pointer_expression "*(int *)(*(int *)(iVar1 + 0xc) + 0x38)" * (cast_expression "(int *)(*(int *)(iVar1 + 0xc) + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0xc) + 0x38)" ( (binary_expression "*(int *)(iVar1 + 0xc) + 0x38" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "cVar5 = (char)param_2;" (assignment_expression "cVar5 = (char)param_2" identifier = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }" if (parenthesized_expression "((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13)))" ( (binary_expression "(*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))" (parenthesized_expression "(*(char *)(iVar3 + 0x12) != cVar5)" ( (binary_expression "*(char *)(iVar3 + 0x12) != cVar5" (pointer_expression "*(char *)(iVar3 + 0x12)" * (cast_expression "(char *)(iVar3 + 0x12)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x12)" ( (binary_expression "iVar3 + 0x12" identifier + number_literal) )))) != identifier) )) || (parenthesized_expression "(cVar5 != *(char *)(iVar3 + 0x13))" ( (binary_expression "cVar5 != *(char *)(iVar3 + 0x13)" identifier != (pointer_expression "*(char *)(iVar3 + 0x13)" * (cast_expression "(char *)(iVar3 + 0x13)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x13)" ( (binary_expression "iVar3 + 0x13" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }" { (expression_statement "iVar4 = FUN_00080d90();" (assignment_expression "iVar4 = FUN_00080d90()" identifier = (call_expression "FUN_00080d90()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }" { (expression_statement "iVar4 = FUN_00076180();" (assignment_expression "iVar4 = FUN_00076180()" identifier = (call_expression "FUN_00076180()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }" { (expression_statement "*(char *)(iVar3 + 0x12) = cVar5;" (assignment_expression "*(char *)(iVar3 + 0x12) = cVar5" (pointer_expression "*(char *)(iVar3 + 0x12)" * (cast_expression "(char *)(iVar3 + 0x12)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x12)" ( (binary_expression "iVar3 + 0x12" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(char *)(iVar3 + 0x13) = cVar5;" (assignment_expression "*(char *)(iVar3 + 0x13) = cVar5" (pointer_expression "*(char *)(iVar3 + 0x13)" * (cast_expression "(char *)(iVar3 + 0x13)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x13)" ( (binary_expression "iVar3 + 0x13" identifier + number_literal) )))) = identifier) ;) })) })) })) })) (expression_statement "*(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;" (assignment_expression "*(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) & number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "int __regparm3 sqlite3BtreeSetVersion(Btree *pBtree,int iVersion)\n\n{\n  BtShared *pBVar1;\n  u8 *puVar2;\n  ushort uVar3;\n  int iVar4;\n  u8 uVar5;\n  \n  pBVar1 = pBtree->pBt;\n  uVar3 = pBVar1->btsFlags & 0xffdf;\n  if (iVersion == 1) {\n    uVar3 = uVar3 | 0x20;\n  }\n  pBVar1->btsFlags = uVar3;\n  iVar4 = sqlite3BtreeBeginTrans(pBtree,0,(int *)0x0);\n  if (iVar4 == 0) {\n    puVar2 = pBVar1->pPage1->aData;\n    uVar5 = (u8)iVersion;\n    if ((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])) {\n      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);\n      if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }\n    }\n  }\n  pBVar1->btsFlags = pBVar1->btsFlags & 0xffdf;\n  return iVar4;\n}\n\n" (function_definition "int __regparm3 sqlite3BtreeSetVersion(Btree *pBtree,int iVersion)\n\n{\n  BtShared *pBVar1;\n  u8 *puVar2;\n  ushort uVar3;\n  int iVar4;\n  u8 uVar5;\n  \n  pBVar1 = pBtree->pBt;\n  uVar3 = pBVar1->btsFlags & 0xffdf;\n  if (iVersion == 1) {\n    uVar3 = uVar3 | 0x20;\n  }\n  pBVar1->btsFlags = uVar3;\n  iVar4 = sqlite3BtreeBeginTrans(pBtree,0,(int *)0x0);\n  if (iVar4 == 0) {\n    puVar2 = pBVar1->pPage1->aData;\n    uVar5 = (u8)iVersion;\n    if ((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])) {\n      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);\n      if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }\n    }\n  }\n  pBVar1->btsFlags = pBVar1->btsFlags & 0xffdf;\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3BtreeSetVersion(Btree *pBtree,int iVersion)" identifier (parameter_list "(Btree *pBtree,int iVersion)" ( (parameter_declaration "Btree *pBtree" type_identifier (pointer_declarator "*pBtree" * identifier)) , (parameter_declaration "int iVersion" primitive_type identifier) ))) (compound_statement "{\n  BtShared *pBVar1;\n  u8 *puVar2;\n  ushort uVar3;\n  int iVar4;\n  u8 uVar5;\n  \n  pBVar1 = pBtree->pBt;\n  uVar3 = pBVar1->btsFlags & 0xffdf;\n  if (iVersion == 1) {\n    uVar3 = uVar3 | 0x20;\n  }\n  pBVar1->btsFlags = uVar3;\n  iVar4 = sqlite3BtreeBeginTrans(pBtree,0,(int *)0x0);\n  if (iVar4 == 0) {\n    puVar2 = pBVar1->pPage1->aData;\n    uVar5 = (u8)iVersion;\n    if ((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])) {\n      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);\n      if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }\n    }\n  }\n  pBVar1->btsFlags = pBVar1->btsFlags & 0xffdf;\n  return iVar4;\n}" { (declaration "BtShared *pBVar1;" type_identifier (pointer_declarator "*pBVar1" * identifier) ;) (declaration "u8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "u8 uVar5;" type_identifier identifier ;) (expression_statement "pBVar1 = pBtree->pBt;" (assignment_expression "pBVar1 = pBtree->pBt" identifier = (field_expression "pBtree->pBt" identifier -> field_identifier)) ;) (expression_statement "uVar3 = pBVar1->btsFlags & 0xffdf;" (assignment_expression "uVar3 = pBVar1->btsFlags & 0xffdf" identifier = (binary_expression "pBVar1->btsFlags & 0xffdf" (field_expression "pBVar1->btsFlags" identifier -> field_identifier) & number_literal)) ;) (if_statement "if (iVersion == 1) {\n    uVar3 = uVar3 | 0x20;\n  }" if (parenthesized_expression "(iVersion == 1)" ( (binary_expression "iVersion == 1" identifier == number_literal) )) (compound_statement "{\n    uVar3 = uVar3 | 0x20;\n  }" { (expression_statement "uVar3 = uVar3 | 0x20;" (assignment_expression "uVar3 = uVar3 | 0x20" identifier = (binary_expression "uVar3 | 0x20" identifier | number_literal)) ;) })) (expression_statement "pBVar1->btsFlags = uVar3;" (assignment_expression "pBVar1->btsFlags = uVar3" (field_expression "pBVar1->btsFlags" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar4 = sqlite3BtreeBeginTrans(pBtree,0,(int *)0x0);" (assignment_expression "iVar4 = sqlite3BtreeBeginTrans(pBtree,0,(int *)0x0)" identifier = (call_expression "sqlite3BtreeBeginTrans(pBtree,0,(int *)0x0)" identifier (argument_list "(pBtree,0,(int *)0x0)" ( identifier , number_literal , (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (iVar4 == 0) {\n    puVar2 = pBVar1->pPage1->aData;\n    uVar5 = (u8)iVersion;\n    if ((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])) {\n      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);\n      if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar2 = pBVar1->pPage1->aData;\n    uVar5 = (u8)iVersion;\n    if ((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])) {\n      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);\n      if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }\n    }\n  }" { (expression_statement "puVar2 = pBVar1->pPage1->aData;" (assignment_expression "puVar2 = pBVar1->pPage1->aData" identifier = (field_expression "pBVar1->pPage1->aData" (field_expression "pBVar1->pPage1" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "uVar5 = (u8)iVersion;" (assignment_expression "uVar5 = (u8)iVersion" identifier = (cast_expression "(u8)iVersion" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) (if_statement "if ((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])) {\n      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);\n      if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }\n    }" if (parenthesized_expression "((puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13]))" ( (binary_expression "(puVar2[0x12] != uVar5) || (uVar5 != puVar2[0x13])" (parenthesized_expression "(puVar2[0x12] != uVar5)" ( (binary_expression "puVar2[0x12] != uVar5" (subscript_expression "puVar2[0x12]" identifier [ number_literal ]) != identifier) )) || (parenthesized_expression "(uVar5 != puVar2[0x13])" ( (binary_expression "uVar5 != puVar2[0x13]" identifier != (subscript_expression "puVar2[0x13]" identifier [ number_literal ])) ))) )) (compound_statement "{\n      iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);\n      if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }\n    }" { (expression_statement "iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0);" (assignment_expression "iVar4 = sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0)" identifier = (call_expression "sqlite3BtreeBeginTrans(pBtree,2,(int *)0x0)" identifier (argument_list "(pBtree,2,(int *)0x0)" ( identifier , number_literal , (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (iVar4 == 0) {\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);\n        if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }\n      }" { (expression_statement "iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage);" (assignment_expression "iVar4 = sqlite3PagerWrite(pBVar1->pPage1->pDbPage)" identifier = (call_expression "sqlite3PagerWrite(pBVar1->pPage1->pDbPage)" identifier (argument_list "(pBVar1->pPage1->pDbPage)" ( (field_expression "pBVar1->pPage1->pDbPage" (field_expression "pBVar1->pPage1" identifier -> field_identifier) -> field_identifier) )))) ;) (if_statement "if (iVar4 == 0) {\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n          puVar2[0x12] = uVar5;\n          puVar2[0x13] = uVar5;\n        }" { (expression_statement "puVar2[0x12] = uVar5;" (assignment_expression "puVar2[0x12] = uVar5" (subscript_expression "puVar2[0x12]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2[0x13] = uVar5;" (assignment_expression "puVar2[0x13] = uVar5" (subscript_expression "puVar2[0x13]" identifier [ number_literal ]) = identifier) ;) })) })) })) })) (expression_statement "pBVar1->btsFlags = pBVar1->btsFlags & 0xffdf;" (assignment_expression "pBVar1->btsFlags = pBVar1->btsFlags & 0xffdf" (field_expression "pBVar1->btsFlags" identifier -> field_identifier) = (binary_expression "pBVar1->btsFlags & 0xffdf" (field_expression "pBVar1->btsFlags" identifier -> field_identifier) & number_literal)) ;) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "void __regparm3 FUN_00081680(int param_1,int param_2)\n\n{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00081680(int param_1,int param_2)\n\n{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00081680(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char cVar5;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 4);" (assignment_expression "iVar1 = *(int *)(param_1 + 4)" identifier = (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;" (assignment_expression "uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf" identifier = (binary_expression "*(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) & number_literal)) ;) (if_statement "if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar2 = uVar2 | 0x20;\n  }" { (expression_statement "uVar2 = uVar2 | 0x20;" (assignment_expression "uVar2 = uVar2 | 0x20" identifier = (binary_expression "uVar2 | 0x20" identifier | number_literal)) ;) })) (expression_statement "*(ushort *)(iVar1 + 0x18) = uVar2;" (assignment_expression "*(ushort *)(iVar1 + 0x18) = uVar2" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar3 = FUN_00080d90();" (assignment_expression "iVar3 = FUN_00080d90()" identifier = (call_expression "FUN_00080d90()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }" { (expression_statement "iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);" (assignment_expression "iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38)" identifier = (pointer_expression "*(int *)(*(int *)(iVar1 + 0xc) + 0x38)" * (cast_expression "(int *)(*(int *)(iVar1 + 0xc) + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0xc) + 0x38)" ( (binary_expression "*(int *)(iVar1 + 0xc) + 0x38" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "cVar5 = (char)param_2;" (assignment_expression "cVar5 = (char)param_2" identifier = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }" if (parenthesized_expression "((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13)))" ( (binary_expression "(*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))" (parenthesized_expression "(*(char *)(iVar3 + 0x12) != cVar5)" ( (binary_expression "*(char *)(iVar3 + 0x12) != cVar5" (pointer_expression "*(char *)(iVar3 + 0x12)" * (cast_expression "(char *)(iVar3 + 0x12)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x12)" ( (binary_expression "iVar3 + 0x12" identifier + number_literal) )))) != identifier) )) || (parenthesized_expression "(cVar5 != *(char *)(iVar3 + 0x13))" ( (binary_expression "cVar5 != *(char *)(iVar3 + 0x13)" identifier != (pointer_expression "*(char *)(iVar3 + 0x13)" * (cast_expression "(char *)(iVar3 + 0x13)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x13)" ( (binary_expression "iVar3 + 0x13" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }" { (expression_statement "iVar4 = FUN_00080d90();" (assignment_expression "iVar4 = FUN_00080d90()" identifier = (call_expression "FUN_00080d90()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }" { (expression_statement "iVar4 = FUN_00076180();" (assignment_expression "iVar4 = FUN_00076180()" identifier = (call_expression "FUN_00076180()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }" { (expression_statement "*(char *)(iVar3 + 0x12) = cVar5;" (assignment_expression "*(char *)(iVar3 + 0x12) = cVar5" (pointer_expression "*(char *)(iVar3 + 0x12)" * (cast_expression "(char *)(iVar3 + 0x12)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x12)" ( (binary_expression "iVar3 + 0x12" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(char *)(iVar3 + 0x13) = cVar5;" (assignment_expression "*(char *)(iVar3 + 0x13) = cVar5" (pointer_expression "*(char *)(iVar3 + 0x13)" * (cast_expression "(char *)(iVar3 + 0x13)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x13)" ( (binary_expression "iVar3 + 0x13" identifier + number_literal) )))) = identifier) ;) })) })) })) })) (expression_statement "*(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;" (assignment_expression "*(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" * (cast_expression "(ushort *)(iVar1 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) & number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE 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 *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (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 IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != IDENT) )) || (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (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 * (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) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00081680(int param_1,int param_2)\n\n{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00081680(int param_1,int param_2)" (identifier "FUN_00081680") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  ushort uVar2;\n  int iVar3;\n  int iVar4;\n  char cVar5;\n  \n  iVar1 = *(int *)(param_1 + 4);\n  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }\n  *(ushort *)(iVar1 + 0x18) = uVar2;\n  iVar3 = FUN_00080d90();\n  if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }\n  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ushort uVar2;" (type_identifier "ushort") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "char cVar5;" (primitive_type "char") (identifier "cVar5") (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 4);" (assignment_expression "iVar1 = *(int *)(param_1 + 4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;" (assignment_expression "uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf" (identifier "uVar2") (= "=") (binary_expression "*(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" (* "*") (cast_expression "(ushort *)(iVar1 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "0xffdf"))) (; ";")) (if_statement "if (param_2 == 1) {\n    uVar2 = uVar2 | 0x20;\n  }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    uVar2 = uVar2 | 0x20;\n  }" ({ "{") (expression_statement "uVar2 = uVar2 | 0x20;" (assignment_expression "uVar2 = uVar2 | 0x20" (identifier "uVar2") (= "=") (binary_expression "uVar2 | 0x20" (identifier "uVar2") (| "|") (number_literal "0x20"))) (; ";")) (} "}"))) (expression_statement "*(ushort *)(iVar1 + 0x18) = uVar2;" (assignment_expression "*(ushort *)(iVar1 + 0x18) = uVar2" (pointer_expression "*(ushort *)(iVar1 + 0x18)" (* "*") (cast_expression "(ushort *)(iVar1 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "iVar3 = FUN_00080d90();" (assignment_expression "iVar3 = FUN_00080d90()" (identifier "iVar3") (= "=") (call_expression "FUN_00080d90()" (identifier "FUN_00080d90") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);\n    cVar5 = (char)param_2;\n    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }\n  }" ({ "{") (expression_statement "iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);" (assignment_expression "iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(*(int *)(iVar1 + 0xc) + 0x38)" (* "*") (cast_expression "(int *)(*(int *)(iVar1 + 0xc) + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar1 + 0xc) + 0x38)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) + 0x38" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (+ "+") (number_literal "0x38")) () ")"))))) (; ";")) (expression_statement "cVar5 = (char)param_2;" (assignment_expression "cVar5 = (char)param_2" (identifier "cVar5") (= "=") (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2"))) (; ";")) (if_statement "if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }" (if "if") (parenthesized_expression "((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13)))" (( "(") (binary_expression "(*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))" (parenthesized_expression "(*(char *)(iVar3 + 0x12) != cVar5)" (( "(") (binary_expression "*(char *)(iVar3 + 0x12) != cVar5" (pointer_expression "*(char *)(iVar3 + 0x12)" (* "*") (cast_expression "(char *)(iVar3 + 0x12)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x12)" (( "(") (binary_expression "iVar3 + 0x12" (identifier "iVar3") (+ "+") (number_literal "0x12")) () ")")))) (!= "!=") (identifier "cVar5")) () ")")) (|| "||") (parenthesized_expression "(cVar5 != *(char *)(iVar3 + 0x13))" (( "(") (binary_expression "cVar5 != *(char *)(iVar3 + 0x13)" (identifier "cVar5") (!= "!=") (pointer_expression "*(char *)(iVar3 + 0x13)" (* "*") (cast_expression "(char *)(iVar3 + 0x13)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x13)" (( "(") (binary_expression "iVar3 + 0x13" (identifier "iVar3") (+ "+") (number_literal "0x13")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      iVar4 = FUN_00080d90();\n      if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }\n    }" ({ "{") (expression_statement "iVar4 = FUN_00080d90();" (assignment_expression "iVar4 = FUN_00080d90()" (identifier "iVar4") (= "=") (call_expression "FUN_00080d90()" (identifier "FUN_00080d90") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar4 = FUN_00076180();\n        if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }\n      }" ({ "{") (expression_statement "iVar4 = FUN_00076180();" (assignment_expression "iVar4 = FUN_00076180()" (identifier "iVar4") (= "=") (call_expression "FUN_00076180()" (identifier "FUN_00076180") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          *(char *)(iVar3 + 0x12) = cVar5;\n          *(char *)(iVar3 + 0x13) = cVar5;\n        }" ({ "{") (expression_statement "*(char *)(iVar3 + 0x12) = cVar5;" (assignment_expression "*(char *)(iVar3 + 0x12) = cVar5" (pointer_expression "*(char *)(iVar3 + 0x12)" (* "*") (cast_expression "(char *)(iVar3 + 0x12)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x12)" (( "(") (binary_expression "iVar3 + 0x12" (identifier "iVar3") (+ "+") (number_literal "0x12")) () ")")))) (= "=") (identifier "cVar5")) (; ";")) (expression_statement "*(char *)(iVar3 + 0x13) = cVar5;" (assignment_expression "*(char *)(iVar3 + 0x13) = cVar5" (pointer_expression "*(char *)(iVar3 + 0x13)" (* "*") (cast_expression "(char *)(iVar3 + 0x13)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x13)" (( "(") (binary_expression "iVar3 + 0x13" (identifier "iVar3") (+ "+") (number_literal "0x13")) () ")")))) (= "=") (identifier "cVar5")) (; ";")) (} "}"))) (} "}"))) (} "}"))) (} "}"))) (expression_statement "*(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;" (assignment_expression "*(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" (* "*") (cast_expression "(ushort *)(iVar1 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "*(ushort *)(iVar1 + 0x18) & 0xffdf" (pointer_expression "*(ushort *)(iVar1 + 0x18)" (* "*") (cast_expression "(ushort *)(iVar1 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "0xffdf"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

int __regparm3 function_1(type_1 *pBtree,int var_1)

{
  type_2 *pBVar1;
  type_3 *puVar2;
  type_4 var_2;
  int var_4;
  type_3 var_5;
  
  pBVar1 = pBtree->pBt;
  var_2 = pBVar1->btsFlags & 0xffdf;
  if (var_1 == 1) {
    var_2 = var_2 | 0x20;
  }
  pBVar1->btsFlags = var_2;
  var_4 = var_3(pBtree,0,(int *)0x0);
  if (var_4 == 0) {
    puVar2 = pBVar1->pPage1->aData;
    var_5 = (type_3)var_1;
    if ((puVar2[0x12] != var_5) || (var_5 != puVar2[0x13])) {
      var_4 = var_3(pBtree,2,(int *)0x0);
      if (var_4 == 0) {
        var_4 = var_6(pBVar1->pPage1->pDbPage);
        if (var_4 == 0) {
          puVar2[0x12] = var_5;
          puVar2[0x13] = var_5;
        }
      }
    }
  }
  pBVar1->btsFlags = pBVar1->btsFlags & 0xffdf;
  return var_4;
}


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

void __regparm3 MASKED(int param_1,int param_2)

{
  int iVar1;
  ushort uVar2;
  int iVar3;
  int iVar4;
  char cVar5;
  
  iVar1 = *(int *)(param_1 + 4);
  uVar2 = *(ushort *)(iVar1 + 0x18) & 0xffdf;
  if (param_2 == 1) {
    uVar2 = uVar2 | 0x20;
  }
  *(ushort *)(iVar1 + 0x18) = uVar2;
  iVar3 = FUN_00080d90();
  if (iVar3 == 0) {
    iVar3 = *(int *)(*(int *)(iVar1 + 0xc) + 0x38);
    cVar5 = (char)param_2;
    if ((*(char *)(iVar3 + 0x12) != cVar5) || (cVar5 != *(char *)(iVar3 + 0x13))) {
      iVar4 = FUN_00080d90();
      if (iVar4 == 0) {
        iVar4 = FUN_00076180();
        if (iVar4 == 0) {
          *(char *)(iVar3 + 0x12) = cVar5;
          *(char *)(iVar3 + 0x13) = cVar5;
        }
      }
    }
  }
  *(ushort *)(iVar1 + 0x18) = *(ushort *)(iVar1 + 0x18) & 0xffdf;
  return;
}

